Reshaping Multiple Matrices
12 ビュー (過去 30 日間)
古いコメントを表示
Hi,
I am trying to reshape 1081 column vectors (size 49x1 each) using a for loop.
I know the loop needs to go from i=1 to i=1081. And the reshape command should look something like this;
T1= reshape(T1,7,7)
However I cannot seem to figure the correct loop for this.
The column vectors are named T0, T1, T3, .... , T1079, T1080.
Can anyone help me with this?
Many thanks
robin ----- Dublin Institute of Technology
0 件のコメント
回答 (2 件)
the cyclist
2011 年 2 月 3 日
Also, if you can concatenate all your original vectors into one large array, then you can do the reshape in one fell swoop:
>> T = rand(1081,49); % Size of all your vectors, concatenated
>> Tr = reshape(T,[7,7,1081]); % Each slice in 3rd dim is one of your 7x7
参考
カテゴリ
Help Center および File Exchange で Loops and Conditional Statements についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!