Splitting matrix into arrays

3 Ansichten (letzte 30 Tage)
Chase O'Melia
Chase O'Melia am 9 Mai 2020
Kommentiert: Chase O'Melia am 9 Mai 2020
Hello,
how can I split a 2x1000 matrix into a 1x1000?

Akzeptierte Antwort

Robin Kirsch
Robin Kirsch am 9 Mai 2020
I assume that you want to split a 2x1000 matrix into 2 1x1000 vectors.
A simple solution to do this is to extract each row, if A is your 2x1000 then you get the 1x1000 with
B = A(1,:) and C = A(2,:).
You can for-loop over this for x dimensional matrices
  1 Kommentar
Chase O'Melia
Chase O'Melia am 9 Mai 2020
Exactly what I was looking for. Thanks!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Creating and Concatenating Matrices 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