Looping matrix into one column
2 次查看(过去 30 天)
显示 更早的评论
How would it be possible for me to create a single column from a matrix which has 5000 columns. I need each column to remain as they are. To get the mentioned matrix first place i'm using a for-loop. Do i have to define it in the loop then?
0 个评论
采纳的回答
Thomas
2012-3-30
doc reshape
Reshpae should do your job, try the following example
a=[1:4;5:8;9:12;13:16]
c=reshape(a,[],1)
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrices and Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!