create single vectors from a matrix

조회 수: 2 (최근 30일)
Natasha Kratowska
Natasha Kratowska 2012년 8월 15일
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

채택된 답변

Andrei Bobrov
Andrei Bobrov 2012년 8월 15일
편집: Andrei Bobrov 2012년 8월 15일
Let
Yourvector = randi(1000,100,1);
out = reshape(Yourvector,10,[]);
Columns in out - your vectors.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Stress and Strain에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by