Error graphing a VVF
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Cassandra Meyer
il 9 Feb 2022
Commentato: Star Strider
il 9 Feb 2022
I am trying to graph this VVF but it saying "Expected input to be one of these types: function_handle, sym Instead its type was double." What am I doing wrong?
syms t
x = (exp(-t))*sin(t)
y = (exp(-t))*cos(t)
z = 1
fplot3(x, y, z, [0, pi])
Risposta accettata
Star Strider
il 9 Feb 2022
The ‘z’ function needs to be defined as symbolic. Without that provision, fplot3 sees it as a double, not a symbolic constant (which is what you want it to see).
Add that ...
syms t
x = (exp(-t))*sin(t)
y = (exp(-t))*cos(t)
z = sym(1)
fplot3(x, y, z, [0, pi])
... to get what I assume is the desired result.
.
2 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Number Theory 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!