I have a 10x10 matrix file. I am trying to modify it so that I have a 100x1 matrix. When I use c_ndgrid = ndgrid(c), I get 100x1 but it is evaluating column then row. How do I get row then column?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Sunshine
am 25 Okt. 2020
Kommentiert: Ameer Hamza
am 25 Okt. 2020
I have a 10x10 matrix file. I am trying to modify it so that I have a 100x1 matrix. When I use c_ndgrid = ndgrid(c), I get 100x1 but it is evaluating column then row. How do I get row then column? meshgrid gives me a 100x100.
0 Kommentare
Akzeptierte Antwort
Ameer Hamza
am 25 Okt. 2020
You can use reshape()
c_column = reshape(c.', [], 1)
or
c_column = c.';
c_column = c_column(:);
2 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Matrices and Arrays 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!