Filter löschen
Filter löschen

QUESTION ON MATRIX RESHAPING

1 Ansicht (letzte 30 Tage)
ARNAB CHATTARAJ
ARNAB CHATTARAJ am 15 Mär. 2016
Kommentiert: ARNAB CHATTARAJ am 15 Mär. 2016
Respected Sir, Simply I want to know the process how this is done in matlab for higher order matrix---
[1 2 3 [1 1 1 2 2 2 3 3 3
4 5 6 to 1 1 1 2 2 2 3 3 3
7 8 9 ] 1 1 1 2 2 2 3 3 3
4 4 4 5 5 5 6 6 6
4 4 4 5 5 5 6 6 6
4 4 4 5 5 5 6 6 6
7 7 7 8 8 8 9 9 9
7 7 7 8 8 8 9 9 9
7 7 7 8 8 8 9 9 9]
how it can be done for higher order matrix?? Please Reply. Your's Faithfully
Arnab Chattaraj.

Akzeptierte Antwort

Andrei Bobrov
Andrei Bobrov am 15 Mär. 2016
Bearbeitet: Andrei Bobrov am 15 Mär. 2016
a = reshape(1:9,3,[])';
out = kron(a,ones(3));
or
out = repelem(A,3,3)

Weitere Antworten (0)

Kategorien

Mehr zu Modeling 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