How to store a table in a cell array which is inside another cell array?
이전 댓글 표시
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
BHARGOB DEKA
2016년 11월 3일
KSSV
2016년 11월 3일
MyData{1}(:,1) = HourlyDec2008 ;
You missed the second dimension in the above.
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Tables에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!