can anyone help me in plotting the graph for this euler's method question?
Show older comments
clear all
clc
f=@(t,v)9.81-(7/2125)*v^2;
t0=0;
v0=0;
tn=20;
h=2;
fprintf('\n t v ');
while t0<=tn
fprintf('\n%4.3f %4.3f ',t0,v0); %values of x and y
v1=v0+h*f(t0,v0);
t1=t0+h;
t0=t1;
v0=v1;
end
Accepted Answer
More Answers (0)
Categories
Find more on Just for fun in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!