MATLAB Answers

duplicate values in array

조회 수: 3(최근 30일)
OYH 16 Jan 2020
댓글: OYH 20 Jan 2020
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.

  댓글 수: 0

로그인 to comment.

채택된 답변

ME 16 Jan 2020
You can use the repelem function as follows:
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:

  댓글 수: 1

OYH 20 Jan 2020
Thanks for your help

로그인 to comment.

추가 답변(0개)

이 질문에 답변하려면 로그인을(를) 수행하십시오.

Translated by