Here is my code;
%Blasius solution by Euler Method
%---------------
g0=zeros(101,1);
g1=zeros(101,1);
g2=zeros(101,1);
%---------------
g0(1)=0;
g1(1)=0;
% g1(101)=1;
g2(1)=2;
%---------------
G=zeros(101,3);
T=zeros(101,3);
G=[g0 g1 g2];
T=[g1 g2 (-1)*g0.*g2];
%Euler method%
for i=1:100
G(i+1) = G(i) + (T(i)*0.1);
end
What am I missing? I am trying to create the G
matrix but it is always a 101*3
zero matrix. It looks like for loop doesn't work but I couldn't figure out why.