フィルターのクリア

Restructure matrix to get back original matrix

4 ビュー (過去 30 日間)
monkey_matlab
monkey_matlab 2016 年 4 月 24 日
回答済み: Azzi Abdelmalek 2016 年 4 月 24 日
Hello, In the code below, I generate a random 8 x 5 matrix then create a new matrix 'temp' that is A restructured to `temp = reshape(A',r*c,1);`. I then do some manipulation on temp (but keep the dimension 40 x 1). How do you restructure 'temp' now to get back a matrix with the dimension as A (i.e. revert temp back now to a 8 x 5 matrix)?
Thanks. Here is the code that I have so far:
A = randi(10,8,5);
[r c] = size(A);
temp = reshape(A',r*c,1);

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2016 年 4 月 24 日
B=reshape(temp,c,r)'

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by