no definition for plot3

조회 수: 1 (최근 30일)
jilei liu
jilei liu 2024년 5월 7일
댓글: jilei liu 2024년 5월 10일
It's ok to use plot3 in MATLAB script,problems comes when I try to packet them in my function ‘PlotDampRoots’:says plot3 not defined.what suppose I do?
  댓글 수: 3
jilei liu
jilei liu 2024년 5월 8일
I call it in a slider Callback function “omegan_Callback”,"omegan" = the slider value,I want the plot updated when I change “omegan”
DGM
DGM 2024년 5월 8일
For clarity:

댓글을 달려면 로그인하십시오.

채택된 답변

Steven Lord
Steven Lord 2024년 5월 8일
Based on the translation of the Code Analyzer message DGM posted, it seems that somewhere in the PlotDampRoots function you assign to a variable named plot3. If you do that you will not be able to call the plot3 function inside that function (even if the attempted function call occurs before the assignment to the variable in the file.) Search the function for where you assign to plot3 and rename that variable.
  댓글 수: 3
Torsten
Torsten 2024년 5월 9일
You set plot3(x,y,z) = 5 in line 32 of PlotDampRoots. That's very bad.
jilei liu
jilei liu 2024년 5월 10일
oh my god,My head is sticky,Thanks for you guys help!Finally I got the beautiful correct figure I want.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Graphics Objects에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by