Effacer les filtres
Effacer les filtres

Isolating segments and comparing two Arrays?

2 vues (au cours des 30 derniers jours)
JamJan
JamJan le 7 Août 2019
Commenté : Bruno Luong le 7 Août 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?
  1 commentaire
Bruno Luong
Bruno Luong le 7 Août 2019
How do you get 900 in Example1Ind?

Connectez-vous pour commenter.

Réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by