Filter löschen
Filter löschen

How to split 14400x1 into 20 719x1 matrices?

1 Ansicht (letzte 30 Tage)
mohsen moslemin
mohsen moslemin am 22 Aug. 2016
Kommentiert: Andrei Bobrov am 22 Aug. 2016
Hi i have a matrix that has 1 column and that column has 14400 elements what i want is to split it to each 719 elements so i end up with 19 of 719x1 matrices and the last one would be the remaining in size.

Akzeptierte Antwort

Andrei Bobrov
Andrei Bobrov am 22 Aug. 2016
a - your vector;
n = 719;
m = numel(a);
out = reshape([a(:);nan(mod(-m,n),1)],n,[]);

Weitere Antworten (1)

Walter Roberson
Walter Roberson am 22 Aug. 2016
If you have the communications systems toolbox, see buffer()

Kategorien

Mehr zu Operators and Elementary Operations 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