how to plot cell array continuously as line
Afficher commentaires plus anciens
Hi @ all
I would like to plot a cell array countinusly, as line, while the figure keeps the old value, how to do this in an efficient way?
following proceeding
- at first I get a cell array containg int16 values already (from former step) => A = cell(1:20)
- now I would like to plot those values and connecting values as line.
- after finishing for-loop, figure and its values shall remain.
- I get new values in A = cell(1:20)
- I would like to add those values to the plot, so that the new value is connected as line to former value A21(former) to A1(new) the same for y-axixs.
- remain figure and get new values in A and add those values... and so on...........
for c=1:20
y = A{c};
plot(x,y);
x=x+1;
hold on
end
Réponses (1)
David Hill
le 17 Août 2021
y = cell2mat(A(1:20));
plot(1:numel(y),y);
2 commentaires
bernout breyer
le 18 Août 2021
Modifié(e) : bernout breyer
le 18 Août 2021
darova
le 19 Août 2021
try
plot(1:numel(y),y(:))
Catégories
En savoir plus sur Annotations dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!