Community Profile

photo

Chen


Last seen: 10 months ago Active since 2022

Followers: 0   Following: 0

Statistics

Feeds

View by

Question


Euler method table problem.Why my fprintf(y(i+1)) only has the last ans, my y1-y(i+1) is incorrect and how to let the table be tidy?
h=0.2; x=0:h:1; y=zeros(size(x)); y(1)=0; n=numel(y); y1=exp(x)-x-1; fprintf('xn \t yn\t y(xn)\t error\n '); for i=1:n-1 ...

1 year ago | 1 answer | 0

1

answer

Question


Why does the code have Check for incorrect argument data type or missing argument in call to function 'zero'?
h=0.1; x=0:h:1; y=zero(size(x)); y(1)=0; n=numel(y); y1=exp(x)-x-1; for i=1:n-1 f = x(i)+y(i); y(i+1) = y(i) + h...

1 year ago | 1 answer | 0

1

answer