create single vectors from a matrix
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello,
Consider a matrix 100x1.
How can I get vectors of 10x1 where
vector1 has the first 10 rows of the matrix (1st to 10th)
vector2 has the next 10 rows (11th to 20th)
vector3 has the next 10 rows (21th to 30th)
and so on.
Thank you very much.
Natasha
0 Kommentare
Akzeptierte Antwort
Andrei Bobrov
am 15 Aug. 2012
Bearbeitet: Andrei Bobrov
am 15 Aug. 2012
Let
Yourvector = randi(1000,100,1);
out = reshape(Yourvector,10,[]);
Columns in out - your vectors.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!