How to plot a cell array
35 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Katrina Anderson
am 29 Nov. 2018
Bearbeitet: madhan ravi
am 29 Nov. 2018
I have a cell: Behaviourcoded {} 285768x1 with numerical values.
The data consists of 1,2,3 - which represent a behaviour variable.
Each point represents 1/500sec.
I am wanting to plot the data but im not sure how to plot a cell array.
I have tried this:
figure;
hold on;
cellfun(@plot,Behaviourcoded);
but this does not work. I just get a blank graph.
Thanks Katrina
0 Kommentare
Akzeptierte Antwort
madhan ravi
am 29 Nov. 2018
plot([Behaviourcoded{:}])
2 Kommentare
madhan ravi
am 29 Nov. 2018
Bearbeitet: madhan ravi
am 29 Nov. 2018
Probably it depends upon the data as well but in the answer above each data is plotted against corresponding index , maybe attach your data as a .mat file to experiment.
Try
cell2mat(Behaviourcoded)
vertcat(Behaviourcoded)
these are also a probability to concatanete cell arrays.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu 2-D and 3-D Plots 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!