how to create an array of plots in App designer
15 views (last 30 days)
Show older comments
I am using Matlab2019b and i am trying to create a real time plots, the number of plots displayed, depends on the user input parameters, so i defined a property
H_PLOT
;
then i created a for loop when a pushbutton is pressed
for i=1:1:app.num_of_channels
figure;
app.H_PLOT(1:app.num_of_channels) = plot(nan,nan, 'b');
end
but it gives me the following error:
"Assignment between unlike types is not allowed."
i dont understand why however it works well in normal m-code script but it doesnt work in app designer
4 Comments
Walter Roberson
on 13 Jul 2021
It is not clear that you did
properties (Access = private)
H_PLOT; % Description
end
Answers (1)
Walter Roberson
on 23 Jul 2021
In the lines
app.H_PlOT.XData(1:app.index) = 1:app.index;
app.H_PlOT.YData(1:app.index) = 1:app.index;
You are referring to H_PlOT instead of to H_PLOT . That is, you are using lower-case L instead of upper-case L.
3 Comments
Walter Roberson
on 23 Jul 2021
What sequence of events or commands are you using to get that? I tried it and just got a blinking light.
See Also
Categories
Find more on Develop uifigure-Based Apps in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!