produce a code for GUI

조회 수: 1 (최근 30일)
Lim Xiao Hui
Lim Xiao Hui 2021년 6월 15일
답변: Reshma Nerella 2021년 6월 18일
Can i ask if i want to let user insert T1 until T10, and then plot T against x=[0:0.1:1], how about the code should be written for GUI?
Thank you.

답변 (1개)

Reshma Nerella
Reshma Nerella 2021년 6월 18일
Hi,
I see that all the EditFields names are similar, distinguishing with a number.
I suppose the properties names for those EditFields would be T1CEditField, T2CEditField, T3CEditField and so on.
You can plot using the following example code:
v = zeros(1,10);
for i =1:10
v(i) = app.("T" + i + "CEditField").Value;
end
plot(app.UIAxes,0:0.1:1,v);
Hope this helps!

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by