How to accesss the columns of a matrix in a cell array in matlab?
1 次查看(过去 30 天)
显示 更早的评论
I have a cell 8X1.The elements are matrices of m-by n dimensions. I want to take the count of the elements in the nth row..
1 个评论
Azzi Abdelmalek
2014-2-15
I want to take the count of the elements in the nth row: what does that mean?
回答(1 个)
Azzi Abdelmalek
2014-2-15
% Example
m=4;
n=5;
A=arrayfun(@(x) rand(m,n),(1:8)','un',0)
%--------------------------------------
for k=1:numel(A)
last_row=A{k}(m,:)
%do
end
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Resizing and Reshaping Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!