large binary matrix comparison with ones matrix - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

large binary matrix comparison with ones matrix

AndreeeaAndreeea Posts: 1Member
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
Sign In or Register to comment.