Update graph edit text input

1 回表示 (過去 30 日間)
Unkown
Unkown 2021 年 3 月 14 日
回答済み: Dongyue 2022 年 11 月 21 日
How can i change the value of Kp,Kd, and Ki when the user input the value through edit text and push button? I able to change the value for the output but the graph remain the same
a simple program for this
% G=1/(s^2+3s+1)
syms s
num=1;
d
en = sym2poly(s^2+3*s+1);
G=tf(num,den);
H=1;
step(feedback(G,H))
hold on
Kp=1;
Ki=15;
Kd=13;
C=pid(Kp,Ki,Kd);
T=feedback(C*G, H);
step(T)

回答 (1 件)

Dongyue
Dongyue 2022 年 11 月 21 日
Hi, you need to add a callback function to the push button, which reads the value from the edit text and executes the step() function to replace the old one.

カテゴリ

Help Center および File ExchangePID Controller Tuning についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by