union multiple arrays (more than two)

33 visualizaciones (últimos 30 días)
Ioannis Vourvachakis
Ioannis Vourvachakis el 31 de Oct. de 2021
Comentada: Ioannis Vourvachakis el 31 de Oct. de 2021
I want to union more than two arrays. Thank you

Respuesta aceptada

Matt J
Matt J el 31 de Oct. de 2021
Editada: Matt J el 31 de Oct. de 2021
The obvious way it so use a loop,
U=arrays{1}; %cell array containing arrays
for i=2:N
U=union(U,array{i});
end
Are you asking if there is a way that doesn't use a loop? No, I don't believe there is.

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