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

1 次查看(过去 30 天)
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