필터 지우기
필터 지우기

Error graphing a VVF

조회 수: 1 (최근 30일)
Cassandra Meyer
Cassandra Meyer 2022년 2월 9일
댓글: Star Strider 2022년 2월 9일
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일
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개)

카테고리

Help CenterFile Exchange에서 Number Theory에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by