error using plot data must be numeric, datetime, duration or an array convertible to double
3 views (last 30 days)
Show older comments
Pablo Álvarez García
on 10 Feb 2022
Answered: Steven Lord
on 10 Feb 2022
WHY IT GIVE ME AN ERROR???
t=[0:0.1:50]
syms s
gs=1/(s^2 + 5*s + 6);
roots([1 5 6])
gjw=fourier(gs)
plot(t,gjw)
0 Comments
Accepted Answer
Steven Lord
on 10 Feb 2022
Let's see what you're trying to plot.
t=[0:0.1:50]
syms s
gs=1/(s^2 + 5*s + 6);
roots([1 5 6]);
gjw=fourier(gs)
If you want to evaluate gjw for w equal to each of the elements in t you can do this, and then you can plot the result.
syms w
gjw_at_t = subs(gjw, w, t);
plot(t, gjw_at_t)
You might want to plot the real and imaginary parts of gjw_at_t separately.
0 Comments
More Answers (0)
See Also
Categories
Find more on Numbers and Precision 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!