union multiple arrays (more than two)

37 Ansichten (letzte 30 Tage)
Ioannis Vourvachakis
Ioannis Vourvachakis am 31 Okt. 2021
I want to union more than two arrays. Thank you

Akzeptierte Antwort

Matt J
Matt J am 31 Okt. 2021
Bearbeitet: Matt J am 31 Okt. 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.

Weitere Antworten (0)

Kategorien

Mehr zu Matrices and Arrays finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by