How to reshape a matrix from a vector?
古いコメントを表示
I have a vector of 105 elements where the sizes are not compatible for a matrix. I want to make it a 2 dimensional matrix by adding zeros at last so that it becomes compatible for the matrix. Would you please tell me how can i do it?
採用された回答
その他の回答 (1 件)
Sean de Wolski
2014 年 10 月 14 日
編集済み: Sean de Wolski
2014 年 10 月 14 日
If you want a 100x2 from a 105 element vector, padding with zeros, this should do it:
buffer(1:105,100)
カテゴリ
ヘルプ センター および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!