duplicate values in array

3 visualizaciones (últimos 30 días)
OYH
OYH el 16 de En. de 2020
Comentada: OYH el 20 de En. de 2020
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.

Respuesta aceptada

ME
ME el 16 de En. de 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 comentario
OYH
OYH el 20 de En. de 2020
Thanks for your help

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Matrices and Arrays en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by