Hola Compañeros aqui les dejo la exposición del dia Lunes de Las Reglas de Simpson
Univ. Yolger Perez Conde
Documentación
http://www.mediafire.com/download.php?gqigy6smd6bmys2
Programa
http://www.mediafire.com/download.php?b65sr6zk62qcrbe
Descargenlo, si se cae el enlace me avisan para volver a subirlo
sábado, 9 de junio de 2012
viernes, 8 de junio de 2012
function [valor,a,b,c,d] = Spline(vy,vx,xinter)
a=vy;
valor=0;
c=0;b=0;d=0;
h=0;A=eye(length(vx));B=zeros([length(vx)],1);
for i=1:(length(vx)-1)
h(i)=vx(i+1)-vx(i);
end
for i=2:length(h)
A(i,i)=2*(h(i)+h(i-1));
A(i,i-1)=h(i-1);
A(i,i+1)=h(i);
B(i,1)=((3/h(i))*(a(i+1)-a(i)))-((3/h(i-1))*(a(i)-a(i-1)));
end
c=inv(A)*B;
c=c';
for(i=1:length(h))
b(i)=((a(i+1)-a(i))/h(i))-((h(i)/3)*(c(i+1)+2*c(i)));
end
for(i=1:length(h))
d(i)=(c(i+1)-c(i))/(3*h(i));
end
for(i=1:length(vx)-1)
if(vx(i)<=xinter)
if(xinter<=vx(i+1))
valor=a(i)+b(i)*(xinter-vx(i))+c(i)*(xinter-vx(i))^2+d(i)*(xinter-vx(i))^3;
end
end
end
disp(valor)
end
a=vy;
valor=0;
c=0;b=0;d=0;
h=0;A=eye(length(vx));B=zeros([length(vx)],1);
for i=1:(length(vx)-1)
h(i)=vx(i+1)-vx(i);
end
for i=2:length(h)
A(i,i)=2*(h(i)+h(i-1));
A(i,i-1)=h(i-1);
A(i,i+1)=h(i);
B(i,1)=((3/h(i))*(a(i+1)-a(i)))-((3/h(i-1))*(a(i)-a(i-1)));
end
c=inv(A)*B;
c=c';
for(i=1:length(h))
b(i)=((a(i+1)-a(i))/h(i))-((h(i)/3)*(c(i+1)+2*c(i)));
end
for(i=1:length(h))
d(i)=(c(i+1)-c(i))/(3*h(i));
end
for(i=1:length(vx)-1)
if(vx(i)<=xinter)
if(xinter<=vx(i+1))
valor=a(i)+b(i)*(xinter-vx(i))+c(i)*(xinter-vx(i))^2+d(i)*(xinter-vx(i))^3;
end
end
end
disp(valor)
end
http://www.4shared.com/office/Feq644c4/INTERPOLACION_SEGMENTARIA_CONT.htmlinterpolacion segmentearia maribel patzi velarde
http://www.4shared.com/rar/fM3MfiER/Spline.html
El link de la informacion necesaria para aprender interpolacion por spline
El link de la informacion necesaria para aprender interpolacion por spline
http://freakshare.com/files/98izd2lm/Spline.m.htmlla funcion de spline
jueves, 7 de junio de 2012
function [valor,a,b,c,d] = Spline(vy,vx,xinter)
a=vy;
c=0;b=0;d=0;
h=0;A=eye(length(vx));B=zeros([length(vx)],1);
for i=1:(length(vx)-1)
h(i)=vx(i+1)-vx(i);
end
for i=2:length(h)
A(i,i)=2*(h(i)+h(i-1));
A(i,i-1)=h(i-1);
A(i,i+1)=h(i);
B(i,1)=((3/h(i))*(a(i+1)-a(i)))-((3/h(i-1))*(a(i)-a(i-1)));
end
c=inv(A)*B;
c=c';
for(i=1:length(h))
b(i)=((a(i+1)-a(i))/h(i))-((h(i)/3)*(c(i+1)+2*c(i)));
end
for(i=1:length(h))
d(i)=(c(i+1)-c(i))/(3*h(i));
end
for(i=1:length(d)-1)
if(vx(i)<=xinter&xinter<=vx(i+1))
valor=a(i)+b(i)*(xinter-vx(i))+c(i)*(xinter-vx(i))^2+d(i)*(xinter-vx(i))^3
end
end
disp(valor)
end
a=vy;
c=0;b=0;d=0;
h=0;A=eye(length(vx));B=zeros([length(vx)],1);
for i=1:(length(vx)-1)
h(i)=vx(i+1)-vx(i);
end
for i=2:length(h)
A(i,i)=2*(h(i)+h(i-1));
A(i,i-1)=h(i-1);
A(i,i+1)=h(i);
B(i,1)=((3/h(i))*(a(i+1)-a(i)))-((3/h(i-1))*(a(i)-a(i-1)));
end
c=inv(A)*B;
c=c';
for(i=1:length(h))
b(i)=((a(i+1)-a(i))/h(i))-((h(i)/3)*(c(i+1)+2*c(i)));
end
for(i=1:length(h))
d(i)=(c(i+1)-c(i))/(3*h(i));
end
for(i=1:length(d)-1)
if(vx(i)<=xinter&xinter<=vx(i+1))
valor=a(i)+b(i)*(xinter-vx(i))+c(i)*(xinter-vx(i))^2+d(i)*(xinter-vx(i))^3
end
end
disp(valor)
end
Suscribirse a:
Entradas (Atom)