Effacer les filtres
Effacer les filtres

Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

convert each matrix of cells

1 vue (au cours des 30 derniers jours)
jenifer Ask
jenifer Ask le 29 Déc 2019
Clôturé : MATLAB Answer Bot le 20 Août 2021
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 commentaire
Stephen23
Stephen23 le 29 Déc 2019
Modifié(e) : Stephen23 le 30 Déc 2019

Réponses (1)

Image Analyst
Image Analyst le 29 Déc 2019
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

Cette question est clôturée.

Community Treasure Hunt

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

Start Hunting!

Translated by