How do i get a element in a matrix that is stored in a cell array?

7 Ansichten (letzte 30 Tage)
Hello guys, i have a cell array 1X4 in each cell i have a MXN matrix. I want to get a element(x,y) inside one of the matrix stored in the cell.
Im currently creating 4 matrices outside de array and the looking for the elements.
How can i do this?
Tks in advance.
Leonardo Hermoso

Akzeptierte Antwort

Image Analyst
Image Analyst am 30 Apr. 2013
theMatrixInside = yourCellArray{2}; % Use braces to get the array, not a cell.
theElementsValue = theMatrixInside(row, column); % or (y, x)
  7 Kommentare
NS
NS am 6 Dez. 2018
How to do this for all matrices in cell array using cellfun? I need to extract (2,1) i.e. second row and first column element of all matrices within cell array ?
Image Analyst
Image Analyst am 6 Dez. 2018
I don't know. Experiment with it. I rarely use cellfun().

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Matrices and Arrays finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by