File Exchange

image thumbnail


version (1.48 KB) by Justin Griffiths
Find a matrix in a larger matrix


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().

a = [1 2 3;4 2 6;4 3 9];
b = [2 3];

Comments and Ratings (2)

Siyi Deng

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.

Matt Whitaker

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.

MATLAB Release Compatibility
Created with R14SP3
Compatible with any release
Platform Compatibility
Windows macOS Linux

MATLAB Online Live Editor Challenge

View the winning live scripts from faculty and students who participated in the recent challenge.

Learn more

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video