Isolating segments and comparing two Arrays?

1 visualizzazione (ultimi 30 giorni)
JamJan
JamJan il 7 Ago 2019
Commentato: Bruno Luong il 7 Ago 2019
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?

Risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by