Combine logical arrays into one array

조회 수: 114 (최근 30일)
DavidL88
DavidL88 2021년 4월 7일
댓글: DavidL88 2021년 4월 7일
I have 4 '24871x1 logical' called L1, L2, L3, L4. I want to combine these into one 24871x1 logical array. In any given row only one of the four arrays will have a 1. I want the output array to have a 1 if there's a 1 in any row of L1-4 and 0 if all rows are 0 in L1-4. Can anyone advise how I do this?

채택된 답변

James Tursa
James Tursa 2021년 4월 7일
L = L1 | L2 | L3 | L4;

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by