duplicate values in array

조회 수: 3 (최근 30일)
OYH
OYH 2020년 1월 16일
댓글: OYH 2020년 1월 20일
Hello,
I want to duplicate the values in my row vectors.
Screenshot 2020-01-16 at 13.31.43.png
This is my row vectors, and I want to duplicate each value by 10. so that I can have 10 of 6.5369 and 10 of 6.7129 and so on.
Very appreciate if someone lets me know.

채택된 답변

ME
ME 2020년 1월 16일
You can use the repelem function as follows:
repelem(angvel,10)
to get each value repeated ten times .
If instead you wanted the array repeated ten times end on end then you can use repmat instead:
repmat(angvel,10,1)
  댓글 수: 1
OYH
OYH 2020년 1월 20일
Thanks for your help

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by