how to add timestep iteration and show all iteration in plot
Show older comments
Accepted Answer
More Answers (1)
time = [4 50] ;
points = [20 100] ;
% interpolation
step_count = time(1):0.1:time(2) ; % timestep 0.1
expected_points = interp1(time,points,step_count) ;
% plot
plot(time,points,'*r',step_count,expected_points,'-g')
ylim([0 110])
Categories
Find more on Characters and Strings 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!