Borrar filtros
Borrar filtros

Isolating segments and comparing two Arrays?

1 visualización (últimos 30 días)
JamJan
JamJan el 7 de Ag. de 2019
Comentada: Bruno Luong el 7 de Ag. de 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?

Respuestas (0)

Categorías

Más información sobre NaNs en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by