필터 지우기
필터 지우기

How to update values ​​in a graph taken from a slider

조회 수: 1 (최근 30일)
Carlos Zuñiga
Carlos Zuñiga 2012년 12월 9일
I'm programming a PID (GUI) for a control system, but I have problems with the sliders. I can not make the graph updates as you move the slider.
I have to do that every time the slider is moved to update the graphics, without pressing any additional buttons.

답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2012년 12월 9일
You need to insert a plot function inside a slider function callback.
  댓글 수: 2
Carlos Zuñiga
Carlos Zuñiga 2012년 12월 9일
편집: Carlos Zuñiga 2012년 12월 9일
Yes, the problem is that the data is not updated automatically.
e.g.
slider1_Callback function (hObject, eventdata, hand ....
h = get (handles.slider1, 'value')
sys = feedback (sys, h)
axes (handles.axes1)
rlocus (sys)
grid on
But when you move the slider the graph does not change.
Azzi Abdelmalek
Azzi Abdelmalek 2012년 12월 9일
What is sys? can you post the full slider1_Callback function?

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

카테고리

Help CenterFile Exchange에서 PID Controller Tuning에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by