Commit 646f5530 authored by Adriaens, Ines's avatar Adriaens, Ines ✌🏼
Browse files

Upload New File

parent c4ae6ab2
function [output1,output2] = F3_pattern(B,A)
SIZE = length(B)-length(A)+1;
match = zeros(1,SIZE);
for i = 1:SIZE
match(i) = max(all(B(i:i-1+length(A))==A));
end
output1 = find(match == 1);
idx = find(diff(output1)==1);
output2 = output1;
output2(:,idx+1) = [];
end
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment