MATLAB Answers

duplicate values in array

10 views (last 30 days)
OYH
OYH on 16 Jan 2020
Commented: OYH on 20 Jan 2020 at 10:56
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.

  0 Comments

Sign in to comment.

Accepted Answer

ME
ME on 16 Jan 2020
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 Comment

OYH
OYH on 20 Jan 2020 at 10:56
Thanks for your help

Sign in to comment.

More Answers (0)

Sign in to answer this question.