Sie sind auf Seite 1von 1

Cdigo: Mtodo del Trapecio en matlab

clear all;
clc;
fprintf('Calculo de la integral por el metodo trapecial\n\n');
f=input('introduce la funcion:','s');
a=input('lime inferior:');
b=input('limite superior:');
c=input('numero de segmentos a dividir:');
h=(b-a)/c;
z=0;
for x=a:h:b
k=eval(f);
if x==a,d=k;
end
if x==b,e=k;
end
z=z+k;
end
z=z-d-e;
z=z*2;
z=z+d+e;
z=z/(2*c);
z=z*(b-a)
fprintf('Resultado ')

https://www.academia.edu/7821465/METODOS_NUMERICOS_PARA_INGENIER
IA
http://noticias.bitel.pe/home.html?
isdn=51928030019&old_url=numat.net/ejerc/interp/mincuad/Mincu
ad_0.pdf
https://books.google.com.pe/books?
id=LJjkv0OlnWwC&pg=PA101&lpg=PA101&dq=ejercicios+de+funcio
nes+tabulares+por+metodo+de+newton+en+diferencias+dividada
s&source=bl&ots=NcbP2qJrrt&sig=Lxnuh7O3Jd9gnF92WKcnWydDg
Zc&hl=es419&sa=X&ved=0ahUKEwjL5paTyLbRAhWDWCYKHYvSAq8Q6AEISzA
I
http://numat.net/ejerc/
http://portales.puj.edu.co/objetosdeaprendizaje/Online/OA10/Anima
cionesFlash/indicecap5.html

Das könnte Ihnen auch gefallen