union multiple arrays (more than two)

37 vues (au cours des 30 derniers jours)
Ioannis Vourvachakis
Ioannis Vourvachakis le 31 Oct 2021
I want to union more than two arrays. Thank you

Réponse acceptée

Matt J
Matt J le 31 Oct 2021
Modifié(e) : Matt J le 31 Oct 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.
  1 commentaire
Ioannis Vourvachakis
Ioannis Vourvachakis le 31 Oct 2021
That I was asking about, I just found it. Thank you for your response anyway!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Matrices and Arrays dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by