How to extend array?

2 visualizaciones (últimos 30 días)
Rikke
Rikke el 30 de Abr. de 2019
Comentada: Rikke el 30 de Abr. de 2019
I want to extend an array like this:
A = [1 2 3 4];
B = [2 3 5 7];
C =[1 1 2 2 2 3 3 3 3 3 4 4 4 4 4 4 4];
How could I do that?

Respuesta aceptada

madhan ravi
madhan ravi el 30 de Abr. de 2019
repelem(A,B)
  1 comentario
Rikke
Rikke el 30 de Abr. de 2019
Perfect, thanks!

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.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by