How can I create a matrix of N columns by using just one vector.

Hi! If I have a vector like (5 8 7 9 8 4 7)' how can I create a matrix of N (for example 1000) columns formed by this vector? Thank you!

답변 (1개)

Theo
Theo 2015년 4월 23일
vec= [5 8 7 9 8 4 7]';
vec_repeat=repmat(vec,1,1000);

카테고리

도움말 센터File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

제품

질문:

2015년 4월 23일

답변:

2015년 4월 23일

Community Treasure Hunt

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

Start Hunting!

Translated by