Isolating segments and comparing two Arrays?

조회 수: 1 (최근 30일)
JamJan
JamJan 2019년 8월 7일
댓글: Bruno Luong 2019년 8월 7일
I have the following double (2 arrays)
A = [NaN NaN;NaN NaN;NaN NaN;NaN NaN;NaN NaN;NaN NaN;NaN NaN;NaN NaN;NaN NaN;NaN NaN;NaN NaN;NaN NaN;NaN NaN;0 NaN;0 NaN;0 NaN;0 NaN;1 NaN;1 0;1 0;1 0;1 0;1 0;1 0;1 0;1 0;1 0;1 1;1 1;1 1;1 1;1 1;1 1;1 1;1 1;0 1;0 1;0 1;0 1;0 1;0 1;0 1;0 1;0 1;0 1;0 1;1 1;1 0;1 0;1 0;1 0;1 0;1 0;1 0;1 0;1 1;1 1;1 1;1 1;0 1;0 1;0 1;0 1;0 1;0 1;0 1;0 1;0 1;1 1;1 0;1 0;1 0;1 0;1 0;1 0;1 0;1 0;1 1;1 1;1 1;1 1;1 1;0 1;0 1;0 1;0 1;0 1;0 1;0 1;0 1;1 1;1 0;1 0;1 0;1 0;1 0;1 0;1 0;1 0;1 1;1 1;1 1;1 1;0 1;0 1;0 1;0 1;0 1;0 1;0 1;0 1;0 1;1 0;1 0;1 0;1 0;1 0;1 0;1 0;1 0;1 0;1 1;1 1;1 1;1 1;0 1;0 1;0 1;0 1;0 1;0 1;0 1;0 1;0 1;1 1;1 0;1 0;1 0;1 0;1 0;1 0;1 0;1 0;1 1;1 1;1 1;1 1;1 1;0 1;0 1;0 1;0 1;0 1;0 1;0 1;0 1;1 1;1 0;1 0;1 0;1 0;1 0;1 0;1 0;1 0;1 1;1 1;1 1;1 1;0 1;0 1;0 1;0 1;0 1;0 1;0 1;0 1;0 1;1 1;1 0;1 0;1 0;1 0;1 0;1 0;1 0;1 0;1 0;1 1;1 1;1 1;1 1;1 1;1 1;1 1;0 1;0 1;0 1;0 1;0 1;0 1;0 1;1 1;1 1;1 0;NaN 0;NaN 0;NaN 0;NaN 0;NaN 0;NaN 1;NaN 1;NaN 1;NaN NaN;NaN NaN;NaN NaN;NaN NaN;NaN NaN;NaN NaN;NaN NaN;NaN NaN;NaN NaN;NaN NaN;NaN NaN;NaN NaN;NaN NaN;NaN NaN;NaN NaN]
What I want to do is for every column to find subsequently the first 1, untill the last zero before the following one:
Example1 = [1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0] Example1Ind = [900 901 902 903 ... ]
Then I want to look where these arrays overlap and where they are unique. How to do this?

답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by