Extracting elements from cell array of matrices
3 ビュー (過去 30 日間)
古いコメントを表示
Say I have a 101x101 cell array, where each element is a 3x3 matrix. How can I extract the (1,1) element of each of the 101x101 matrices in the cell array, to form a 101x101 matrix of values?
Edit: I've managed to extract the data using the line as follows:
arrayfun(@(x)x{:}(1,1),mycellarray)
回答 (1 件)
madhan ravi
2018 年 10 月 16 日
編集済み: madhan ravi
2018 年 10 月 16 日
matrix{1,1}
You can convert the whole matrix to matrix values as such :
cell2mat(matrix) %assuming matrix contains doubles
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!