Skip to main content
1 of 2
Saira
  • 104
  • 9

Not sure which platform you are using . if it's MATLAB , here is small code snippet which I quickly wrote using MATLAB's inbuilt "strfind" function

A = [12  534 5 23 44 66  23 68  86854  7  36 457 68 23 46 87 78 588 86 8 44 66  23 68  86854 87 9 905  0 -213 34];
B = [44 66  23 68  86854]

strfind(A,B)    % returns 5 and 21 (starting index of Array B)

You can always use cross-correlation to find the similarity between A and B

Please go through this post . It has detailed explanation with examples.

https://www.mathworks.com/help/signal/examples/measuring-signal-similarities.html

Saira
  • 104
  • 9