I have two array and I want to merge in one . A =['test']; B= [1, 2, 3]; C= ['test', 1, 2, 3];

 Respuesta aceptada

Adam
Adam el 29 de Oct. de 2015

1 voto

{ A, B }
will merge them into a cell array as two distinct cells
[ A, num2cell( B ) ]
will give you a 4-element cell array with the elements of B each in their own cell.

Más respuestas (1)

timo
timo el 29 de Oct. de 2015

1 voto

N1 = py.list({1,2,3})
N2=py.list({'Lists in python'})
N1.append(N2)

1 comentario

Muthu Annamalai
Muthu Annamalai el 29 de Oct. de 2015
IMO - bit of an over kill, even if functional.

Iniciar sesión para comentar.

Categorías

Más información sobre MATLAB en Centro de ayuda y File Exchange.

Productos

Etiquetas

Preguntada:

el 29 de Oct. de 2015

Comentada:

el 29 de Oct. de 2015

Community Treasure Hunt

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

Start Hunting!

Translated by