You are on page 1of 1

for l=1:n

for x=a:b
R1=eval(r);
R2=eval(p);
M1=2*h^2*R1-(2+h*R2)*c;
M2=2*h^2*R1;
M3=2*h^2*R1-(2-h*R2)*d;
if l==1
cl=M1;
B(l)=cl;
else
if l==n;
cl=M3;
B(l)=cl;
else
cl=M2;
B(l)=cl;
end
end
x=x+h;
end
end
C=B';
display(C);

You might also like