union multiple arrays (more than two)

47 visualizzazioni (ultimi 30 giorni)
I want to union more than two arrays. Thank you

Risposta accettata

Matt J
Matt J il 31 Ott 2021
Modificato: Matt J il 31 Ott 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.

Più risposte (0)

Categorie

Scopri di più su Multidimensional Arrays in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by