How to convert a matrix into a vector
292 次查看(过去 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!