How to convert a matrix into a vector
292 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
praveen
am 7 Jan. 2018
Beantwortet: M Shujah Islam Sameem
am 5 Jan. 2019
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 Kommentare
Akzeptierte Antwort
Star Strider
am 7 Jan. 2018
5 Kommentare
Star Strider
am 9 Jan. 2018
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.
Weitere Antworten (1)
M Shujah Islam Sameem
am 5 Jan. 2019
%%%% 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 Kommentare
Siehe auch
Kategorien
Mehr zu Logical 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!