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?
2 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
採用された回答
Ameer Hamza
2020 年 10 月 25 日
You can use reshape()
c_column = reshape(c.', [], 1)
or
c_column = c.';
c_column = c_column(:);
2 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Resizing and Reshaping Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!