What causes difference between ezplot and fplot for the same function plotted below?
Show older comments
Trying to understand difference between ezplot and fplot? When script below is graphed for ezplot around 0.2 sec there appear to be 2 changes in slope of line. Howeve, for fplot around 0.2 sec there is only 1 change in slope of the line (which is the desired result)
%% Code
Fo = 3000; %N
to = 0.2; %s
syms t
F = (Fo/to)*(t*heaviside(t)-(t)*heaviside(t-to)+ to*heaviside(t-to)-to* heaviside(t-5*to) );
%%%%%%%%%%%%%
figure (1)
ezplot(F, [0, 10*to])
title('From ezPlot')
xlabel('time [s]')
ylabel('Force [N]')
%%%%%%%%%%
figure(2)
fplot(F, [0, 10*to])
title('From fplot')
xlabel('time [s]')
ylabel('Force [N]')
Accepted Answer
More Answers (1)
ahmad amer
on 19 Dec 2018
0 votes
ezplot(F, [0, 10*to]);
ylim([0,3000])
Categories
Find more on Line Plots 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!