フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

convert each matrix of cells

1 回表示 (過去 30 日間)
jenifer Ask
jenifer Ask 2019 年 12 月 29 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
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 件のコメント
Stephen23
Stephen23 2019 年 12 月 29 日
編集済み: Stephen23 2019 年 12 月 30 日

回答 (1 件)

Image Analyst
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

この質問は閉じられています。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by