error using plot data must be numeric, datetime, duration or an array convertible to double
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Pablo Álvarez García
il 10 Feb 2022
Risposto: Steven Lord
il 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 Commenti
Risposta accettata
Steven Lord
il 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 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Numbers and Precision in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!