Setting Callback On Nyquist

조회 수: 2 (최근 30일)
Heliolicity
Heliolicity 2016년 4월 19일
댓글: Walter Roberson 2016년 4월 19일
Hi folks,
I've developed a GUI that contains an axes object. The axes object will display a Nyquist plot once a user inputs the numerator and denominator of a transfer function - two things that are needed before generating a Nyquist plot.
What I'd like to do is set a callback on the Nyquist plot so that if a user clicks on it something happens. For the moment I'm happy for that "something" to just be a notification sent to the command window confirming that, yes, the user has successfully clicked on the plot. I've assigned a callback to my axes object but this callback doesn't get triggered if the user clicks on the Nyquist plot. Can anyone here help? I've attached my code.
To get it to run simply enter "1" (no quotation marks) in the numerator field and "1 1" in the denominator field then click "Generate"
  댓글 수: 1
Walter Roberson
Walter Roberson 2016년 4월 19일
In my observation, most of the plotting tools in the Control Systems toolbox create their own figure instead of using any existing figure or axes. And they do not return the figure or axes handle either.

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

답변 (1개)

Image Analyst
Image Analyst 2016년 4월 19일
I get as far as when it tries to use tf, then it says:
Undefined function 'tf' for input arguments of type 'double'.
but it is executing the button callback. So what's wrong with that? What's wrong with the user simply clicking a button, the Generate button, to update the graph?
  댓글 수: 1
Heliolicity
Heliolicity 2016년 4월 19일
Strange, when I input values into the two edit boxes I don't see that error. Try inputting
1
in the top editbox then
1 2
in the second and click "Generate". What should happen is that the Nyquist plot appears on the axes. It will just be a blue circle if you use those values. The reason that I need a callback on the plot is that one of the ultimate aims of what I'm doing (part of a project) is that users should be able to specify different values of omega (i.e. imaginary numbers on the Nyquist plot) that they want to isolate and examine.

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by