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])

1 件のコメント

Cassandra Meyer
Cassandra Meyer 2022 年 2 月 9 日
This is what I'm graphing.

サインインしてコメントする。

 採用された回答

Star Strider
Star Strider 2022 年 2 月 9 日

0 投票

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)
x = 
y = (exp(-t))*cos(t)
y = 
z = sym(1)
z = 
1
fplot3(x, y, z, [0, pi])
... to get what I assume is the desired result.
.

2 件のコメント

Cassandra Meyer
Cassandra Meyer 2022 年 2 月 9 日
Yes, this is perfect. Thank you so much!
Star Strider
Star Strider 2022 年 2 月 9 日
As always, my pleasure!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeOperators and Elementary Operations についてさらに検索

製品

リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by