How can I plot colums off different cell arrays?
Show older comments
Hi,
I am trying to plot colums of cells of different matrix arrays. Each column of each array has the same length. The first array is a cell array of cells and the second array is a data array of cells.
For example:
%%%%%%
t1=[1 2 3 4 5 6]'; t2=[2 3 4 5 6 7 8 9 10]'; data1=[5 2 7 10 3 0]'; data2=[1 3 1 5 2 8 3 0 15]'; t={t1,t2}; data={data1,data2};
plot(t,data)
%%%%%%
Error using plot Not enough input arguments.
Error in Prueba1 (line 8) plot(t,data)
%%%%%%%%%
plot between matrix is useful to plot matrix1 columns agains matrix2 columns, but the matrix must be rectangular, and my data is not rectangular, that is why I use cell arrays.
I want to avoid selecting each cell column or the use of "for" sentences, because the cell arrays could have big volume of data, and a lot of columns.
%%%%%%%%%% AVOID
plot(t{1},data{1},t{2},data{2})
or
for i=1:1:length(data) plot(t{i},data{i}) hold all end
%%%%%%%% Which is the correct sentence to plot the cell arrays as plotting matrix?Is it possible?
Thanks in advance.
Answers (0)
Categories
Find more on Data Distribution Plots in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!