Understanding "Cell contents reference from a non-cell array object." error
显示 更早的评论
i try to convert table mnew to array. Below is my code. Please help me to understand. I also tried tabletoarray(has error too) n tabletocell not suitable to my needs.
for iii = 1 : k %k=4
for jj = 1 : noofcol-1 %11-1
val2 = mnew{iii,jj};
if (ischar(val2))
val2 = str2double(val2);
end
M_M(iii,jj) = val2;
end
end
MMM = reshape(M_M,k,noofcol-1)
however there is an error
"Cell contents reference from a non-cell array object.
val2 = mnew{iii,jj};
3 个评论
James Tursa
2019-11-18
Well, what does this show?
whos mnew
Khairul Nur
2019-11-18
James Tursa
2019-11-18
So. the curly braces { } are for use with indexing into cell arrays, and mnew is not a cell array, hence the error.
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Graphics Object Properties 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!