Why won't this function plot?
1 view (last 30 days)
For some reason I can't plot this function.
c1_exp = b1*exp(-a1*t) + b2*exp(-a2*t);
All variables except for t are constants.
fplot(c1_exp, 'g-', 'Linewidth', 3)
for ii= 1:30
Nothing happens but I don't get any error messages.
What am I doing wrong?
_ on 19 Jan 2022
With your for loop, you're plotting one data point at a time, which is impossible to see without a data marker. And fplot() is for plotting with a function handle, e.g.,
fplot(@(t) b1*exp(-a1*t) + b2*exp(-a2*t))