1 Download
Updated 17 Aug 2006
No License
Find a pattern matrix within a larger matrix. Supports anything that can be converted to a double using double().
Example:
a = [1 2 3;4 2 6;4 3 9];
b = [2 3];
findmat(a,b)
findmat(a,b')
Justin Griffiths (2021). findmat (https://www.mathworks.com/matlabcentral/fileexchange/11990-findmat), MATLAB Central File Exchange. Retrieved .
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Create scripts with code, output, and formatted text in a single executable document.
Although this function generally does what it states, it is limitated on several aspects: most obviously, it can not handle a moderately large [a] input. for instance, try a = randn(5000);
another thing that make me dubious on using this function is it is quite slow, when [a] is within-the-limit large.
Overall, I don't recommend it.
What I like about this submission is that it handles finding multi-dimensional patterns in multi-dimensional data. Some guru might be able to vectorize it a bit but it works fine as it is.