how to de concatenate in matlab?

we used "hortcat" function for concatenating two matices.we didnot know how to deconcatenate it.please help us.

Respuestas (1)

David Young
David Young el 19 de En. de 2012

0 votos

Use indexing.
a = [1 2 3];
b = [4 5 6];
c = horzcat(a, b); % [EDITED]: horcat->horzcat
anew = c(1:3);
bnew = c(4:6);

3 comentarios

Abi Aarthy
Abi Aarthy el 19 de En. de 2012
thank you.
Jan
Jan el 19 de En. de 2012
Btw. HORZCAT is the same as including the arguments in [ and ], so this:
a = [1, 2, 3]
is equivalent to
a = horzcat(1,2,3)
Glo
Glo el 15 de En. de 2015
can this be done in simulink by some block?

Iniciar sesión para comentar.

Categorías

Más información sobre Probability Density Functions en Centro de ayuda y File Exchange.

Etiquetas

Aún no se han introducido etiquetas.

Preguntada:

el 19 de En. de 2012

Comentada:

Glo
el 15 de En. de 2015

Community Treasure Hunt

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

Start Hunting!

Translated by