Borrar filtros
Borrar filtros

Repeat values in a matrix

1 visualización (últimos 30 días)
Athira Surendran
Athira Surendran el 4 de Abr. de 2017
Editada: KSSV el 4 de Abr. de 2017
I want to convert a column matrix of size 10x1 to 10x10000 matrix in which all columns in the converted matrix are same as the values in the initial column matrix,
For example, x=[a;b;c], if i convert this to a 3x3 matrix, it should be [a a a; b b b; c c c]

Respuesta aceptada

KSSV
KSSV el 4 de Abr. de 2017
Editada: KSSV el 4 de Abr. de 2017
doc repmat
x = [1 2 3] ;
iwant = repmat(x,3,1)

Más respuestas (0)

Categorías

Más información sobre Matrix Indexing en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by