PADCAT on cells with nested cells
1 次查看(过去 30 天)
显示 更早的评论
try to use Padcat function on my cells, but I can't, because my cells include nested cells, Attached my fils (6*47). (6 is number my images).
how to change this code to access the correct result (matrix with size 6*n)?
padcat can be downloaded from the File Exchange: https://uk.mathworks.com/matlabcentral/fileexchange/22909-padcat-varargin-
load ('rotate.mat')
a_2=rotatedImage;
for i=1:6
[m{i}, tf{i}] = padcat(a_2(i,:))'; % concatenate, pad rows with NaNs
m{i}(~tf{i}) = 0 % replace N
vec_rotate{i}= cell2mat(a_2(i,:))' ;
vec_rotate{i}=vec_rotate(i,:)'
end
7 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Type Conversion 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!