Why can't I use fplot command ?

t= -2:0.001:4;
x_t= (50.*exp(-3.82.*t)).*heaviside(t);
h_t= (25.*t.*exp(-1.91*t)).*heaviside(t);
fplot(x_t,t)
Error: Error using fplot (line 145)
Invalid parameter '-2 ...'.
Can you explain why am I getting this error ?

Réponses (1)

the cyclist
the cyclist le 20 Déc 2020

1 vote

fplot expects a function as input. I think you want the plot command instead, which expects numerical vector input ...
plot(x_t,t)

Produits

Version

R2018b

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by