a basic question in matlab

1 次查看(过去 30 天)
Hello all,
If I have a 1xLxN matrix and would like to reshape it in order to get a LxN matrix, how I can do that? In particular, suppose I have a 1x2x4 matrix a:
a(1,:,1)=[0 0]; a(1,:,2)=[0 1];a(1,:,3)=[1 1];a(1,:,4)=[0 1];
and I would like to get a 4x2 matrix of [0 0;0 1;1 1;0 1]? Thanks.

采纳的回答

Azzi Abdelmalek
Azzi Abdelmalek 2015-6-21
编辑:Azzi Abdelmalek 2015-6-21
Edit
squeeze(a).'

更多回答(0 个)

类别

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

标签

Community Treasure Hunt

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

Start Hunting!

Translated by