App designer UIAxes loop
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Jonathan Moorman
am 3 Mär. 2021
Bearbeitet: Mehmed Saad
am 3 Mär. 2021
Hi. I am user app designer and need to designate different locations (for graphing) based on the loop # and a given starting value.
For example, if num= 3 and w = 1, the coding will go:
for i = 1:num
UserPlot = app.UIAxes(i)_w
Scatter(UserPlot, x , y)
end
So, the user plot should have results of: app.UIAxes1_1, app.UIAxes2_1, app.UIAxes3_1 after the loop is complete.
How would i write the "UserPlot = ...." line.
0 Kommentare
Akzeptierte Antwort
Mehmed Saad
am 3 Mär. 2021
Bearbeitet: Mehmed Saad
am 3 Mär. 2021
x.test_1_se = 10;x.test_2_se = 20;x.test_3_se = 30;
str_val = strcat('test_',string(1:3),'_se');
y = zeros(1,3);
for u = 1:3
y = x.(str_val(u));
end
check if this approach is helpful.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Develop Apps Using App Designer finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!