필터 지우기
필터 지우기

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