error using plot data must be numeric, datetime, duration or an array convertible to double
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Pablo Álvarez García
am 10 Feb. 2022
Beantwortet: Steven Lord
am 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 Kommentare
Akzeptierte Antwort
Steven Lord
am 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 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Numbers and Precision finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!