How to convert a matrix into a vector
163 ビュー (過去 30 日間)
古いコメントを表示
I have a matrix and i need to convert it into a vector. Basically i need to remove the dependency of one parameter.Please see the image file i have attached.
0 件のコメント
採用された回答
Star Strider
2018 年 1 月 7 日
5 件のコメント
Star Strider
2018 年 1 月 9 日
If the mathematics are not important and any procedure will do, the easiest approach would likely be something like:
Result = mean(A,2,'omitnan')
where ‘A’ is your matrix.
その他の回答 (1 件)
M Shujah Islam Sameem
2019 年 1 月 5 日
%%%% Converting Matix to vector
A = [1 2 3; 4 5 6; 7 8 9] % Example matrix
reshape(A,[],1) % convert matrix to column vector
reshape(A,1,[]) % convert matrix to row vector
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!