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 次查看(过去 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.

采纳的回答

Ameer Hamza
Ameer Hamza 2020-10-25
You can use reshape()
c_column = reshape(c.', [], 1)
or
c_column = c.';
c_column = c_column(:);

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Matrices and Arrays 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by