metodo matricial
-
Upload
domadordelibros -
Category
Documents
-
view
219 -
download
0
description
analisis numerico matrices
Transcript of metodo matricial
u0=input('ingrese la condicion inicial cuanto u es cero: ');uL=input('ingrese la condicion inicial cuando u es L: ')n=input('ingrese el numero de subdominios: ')L=input('ingrese la longitud del intervalo L= ');h=L/n;x(1)=u0;x(n+1)=L;for i=2:n; x(i)=(i-1)*h;endfor i=1:n+1; f(i)=sin(pi*x(i)/L);endv(1)=u0;v(n+1)=L;for i=2:n v(i)=0endv0=v; for i=2:n v(i)=h*h*f(i)+v(i-1)+v(i+1) end if error