Filter löschen
Filter löschen

How do i manipulate matrix in form given below??

1 Ansicht (letzte 30 Tage)
Paranshu
Paranshu am 18 Okt. 2013
Kommentiert: Paranshu am 18 Okt. 2013
1 2; 3 4; 5 6; 7 8;
as
1 2 3 4; 5 6 7 8;
  1 Kommentar
Jos (10584)
Jos (10584) am 18 Okt. 2013
Homework? I suggest you read the help of RESHAPE and TRANSPOSE

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Azzi Abdelmalek
Azzi Abdelmalek am 18 Okt. 2013
Bearbeitet: Azzi Abdelmalek am 18 Okt. 2013
A=[1 2; 3 4; 5 6; 7 8]
BB=reshape(A',4,[])'
  3 Kommentare
Azzi Abdelmalek
Azzi Abdelmalek am 18 Okt. 2013
Bearbeitet: Azzi Abdelmalek am 18 Okt. 2013
Please copy and paste the code
A=[1 2; 3 4; 5 6; 7 8]
BB=reshape(A',4,[])'
The result
>>BB =
1 2 3 4
5 6 7 8
%or maybe you want this
A=[1 2; 3 4; 5 6; 7 8]
BB=reshape(A',[],2)'
Paranshu
Paranshu am 18 Okt. 2013
It was really helpfull..thanks

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Andrei Bobrov
Andrei Bobrov am 18 Okt. 2013
reshape(a',size(a))';

Kategorien

Mehr zu Resizing and Reshaping Matrices finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by