How do I partition a n by m matrix into equal rows

6 Ansichten (letzte 30 Tage)
Princewill Azorom
Princewill Azorom am 3 Aug. 2020
Kommentiert: Walter Roberson am 5 Aug. 2020
How do I partition an n by m matrix into equal rows please I've been trying to write a script that does this but I haven't been having much progress please can anyone help me
  2 Kommentare
Matt J
Matt J am 4 Aug. 2020
Princewill Azorom's question moved here:
Okay... here goes. Write a function that takes two positive integer inputs n and m. The function returns a 3n by m matrix called T. The top third of T(an n by m submatrix) is all 1's, the middle third is all 2's while the bottom third is all 3's.
Walter Roberson
Walter Roberson am 5 Aug. 2020
Hint:
A = array of ones
B = array of twos
C = array of threes
[A;B;C]

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Matt J
Matt J am 4 Aug. 2020

Kategorien

Mehr zu Multidimensional Arrays finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by