Hello,
There is an array A size (NxM), each column represents when a signal was created. I need to close that signal if certain time it was not created again and assign -1 value. For example like this:
1 0 1 0 1
0 1 0 1 0
0 0 1 0 0
1 0 0 1 1
0 0 1 1 0
0 1 0 0 0
I need to count consecutive occurrences of zero column-vise, and if zero occurred for defined number of times for example two, it should be changed to -1 and output should look like this:
1 0 1 0 1
0 1 0 1 0
-1 0 1 0 -1
1 -1 0 1 1
0 0 1 1 0
-1 1 0 0 -1
Count conservative occurrences of zeros and if zero appeared for defined number of times it should be changed.
1 Comment
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/409297-count-conservative-occurrences-of-zeros-and-if-zero-appeared-for-defined-number-of-times-it-should-b#comment_586944
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/409297-count-conservative-occurrences-of-zeros-and-if-zero-appeared-for-defined-number-of-times-it-should-b#comment_586944
Sign in to comment.