use newton methode deal with a non linear (equation system)

I cant get that followed picture that what i need. S1(i) without result be shown on the matlab.
may be newton methode and funktion F and jacobi JF should be separate writen on the matlab.
but how to wirte a funtion for the matrix

[img=http://a8.sphotos.ak.fbcdn.net/hphotos-ak-snc6/262180_236905839656442_100000110822134_1184143_4104800_n.jpg]

[code]
%%%Front-fixing Method
%%implicit schema
%%Parameter ersteelung
X0=1; Xmax=2; K=1; r=0.1; vol=0.2; T=1;y1=1;error=0.1;N1=100;

%%Gitter erstellung
N=50;
M=50;
k=T/(N+1); %Timestep;
h=(Xmax-1)/(M+1); %stockstep;
X=[X0:h:Xmax];
%% Boundary Condition
% final condition
for j=1:M+2
f1(j,N+1)=0;
end
%freiei randwert
S1(N+1)=K;
%
for i=1:N+1
f1(M+2,i)=0;
end
%%%Definition von f1(1,i)und f1(2,i)
for i=1:N
f1(1,i)=K-S1(i);
f1(2,i)=K-(1+h)*S1(i);
end;

%%Berechnung S1,f1(1,i),f1(2,i)
%%Rechnung a1,b1,c1(Parameters) f
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories