union multiple arrays (more than two)

47 次查看(过去 30 天)
I want to union more than two arrays. Thank you

采纳的回答

Matt J
Matt J 2021-10-31
编辑:Matt J 2021-10-31
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.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Multidimensional Arrays 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by