union multiple arrays (more than two)

조회 수: 47 (최근 30일)
Ioannis Vourvachakis
Ioannis Vourvachakis 2021년 10월 31일
댓글: Ioannis Vourvachakis 2021년 10월 31일
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