Info
此问题已关闭。 请重新打开它进行编辑或回答。
convert each matrix of cells
2 次查看(过去 30 天)
显示 更早的评论
I have 6 images. In each, I have identified a number of different special points on which to extract the attributes. (Because of the different cell)
In the first image I have 15 matrices, 3 x 3. And so there are the number of special points in each matrix image.
First, I want to transform the individual matrices of each cell into vectors. Then paste them into their own rows.
I know a simple matrix can be transformed into a vector with (:). But I can't work with that many cells.
回答(1 个)
Image Analyst
2019-12-29
Try this:
s = load('gmag.mat')
Gmag = s.Gmag
% Get the size of Gmag.
[rows, columns] = size(Gmag)
% Loop over each cell of the Gmag cell array.
for col = 1 : columns
for row = 1 : rows
thisMatrix = Gmag{row, col}
% Now do something with thisMatrix.
% Careful! Many of them are empty!
end
end
0 个评论
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!