How to store a table in a cell array which is inside another cell array?
Mostrar comentarios más antiguos
Hi, I have here is a Mydata cell array which has 2 cells which actually represents no of years. So, suppose year 1 is in cell 1 and year 2 is in cell 2. Now i want my cell 1 to have a cell array of (1,2) i.e. suppose year 1 has two months : Dec and Jan. So within year 1, cell 1 will be for month of Dec and cell 2 will be for Jan. Next, I have is for the two months, tabular data with headings and numeric data. I want to store the table for dec,year 1 in MyData{1}(1,1) and so on. here goes my code.
year = 2; month = 2; MyData = cell(1,year);
for i = 1:year
for j = 1:month
MyData(1,i) = {cell(1,j)};
end
end
MyData{1}(:,1) = HourlyDec2008 ;
But I get this error in the last line as: Assignment has more non-singleton rhs dimensions than non-singleton subscripts!!
I will really appreciate if anyone can help me with this issue.
2 comentarios
BHARGOB DEKA
el 3 de Nov. de 2016
KSSV
el 3 de Nov. de 2016
MyData{1}(:,1) = HourlyDec2008 ;
You missed the second dimension in the above.
Respuestas (0)
Categorías
Más información sobre Tables en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!