How do i get a element in a matrix that is stored in a cell array?
8 views (last 30 days)
Show older comments
Leonardo Hermoso
on 30 Apr 2013
Commented: Image Analyst
on 6 Dec 2018
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
0 Comments
Accepted Answer
Image Analyst
on 30 Apr 2013
theMatrixInside = yourCellArray{2}; % Use braces to get the array, not a cell.
theElementsValue = theMatrixInside(row, column); % or (y, x)
7 Comments
NS
on 6 Dec 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 ?
More Answers (0)
See Also
Categories
Find more on Matrices and Arrays in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!