Sie sind auf Seite 1von 1

clc clear syms x; disp(' ') disp(' disp(' ') disp(' ') p=input(' Ingrese disp(' ') disp('

') q=input(' Ingrese disp(' ') r=input(' Ingrese disp(' ') a=input(' Ingrese disp(' ')

METODO DE LAS DIFERENCIAS FINITAS') p(x) de la ecuacin :','s'); q(x) de la ecuacin :','s'); r(x) de la ecuacin :','s'); Inicio del Intervalo: ' );

b=input(' Ingrese Final del Intervalo: '); disp(' ') vi=input(' Ingrese y(a): '); disp(' ') vf=input(' Ingrese y(b): '); if a<b menor=a; mayor=b; else menor=b; mayor=a; end kk=0; while kk==0; disp(' ') H=input( ' Ingrese Tamao de Paso: '); if H<0 || H==0 disp('Porfavor Ingrese Tamao de Paso Positivo') kk=0; else kk=1; end end disp(' ')

% for xi=menor:H:mayor-H % i=i+1; % cowiante=-(1+(H/2)*subs(p,x,xi)); % % cowi=2+((H*H)*subs(q,x,xi)); % cowisig=(1-(H/2)*subs(p,x,xi)); % % cowiante*w(i-1)+cowi*w(i)-cowisig*w(i+1); % igual=(H*H)*subs(r,x,xi); % end %

Das könnte Ihnen auch gefallen