MATRIX MANUPULATION

3 ビュー (過去 30 日間)
ofdma_matlab
ofdma_matlab 2011 年 7 月 9 日
suppose i have a matrix like this, a = [ 1 2 3 4; 5 6 7 8; 9 10 11 12] i want it like b = [1 2; 3 4; 5 6; 7 8; 9 10; 11 12 ] any idea ? thanks in advance

回答 (1 件)

the cyclist
the cyclist 2011 年 7 月 9 日
a_t = a';
b_t = reshape(a_t,2,6);
b = b';
  2 件のコメント
Oleg Komarov
Oleg Komarov 2011 年 7 月 9 日
one liner: b = reshape(a.',2,[]).';
Fangjun Jiang
Fangjun Jiang 2011 年 7 月 9 日
Golfer: b=reshape(a',2,[])'

サインインしてコメントする。

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by