Hello
I have an incredibly large binary matrix.In this matrix let#s call it A, I need to find the sequences of 1.But I need specific sequences.(like 3 ones one after another for example)
For this I created a matrix of ones with one column.---->this matrix must have a specific nr of rows that I introduce from the kb.
for example
A=[1 0 1 1 1 1 1 0 0 0 0........,1] infinite
pattern=[1 1 1,1]
matformed=[ _ _ _,1] of A
How I did it:
I break matrix A using a for loop in a smaller matrixes, based on the no of rows I need.than I compare using isequal(mat_formed,mat ones).
The problem:
It takes ages.Is there a faster way to compare matrixes?
The purpose:
Find the no. of intervals that fit
Thank you