Find a smaller matrix within a larger matrix
I have two matrices with different sizes and I need to find the lower matrix inside the higher matrix.
Example
– Lower Matrix (Unique [1×7])
[ 2 3 4 5 6 7]
– Higher Matrix (Several results [1000×15])
[ 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16] OK
[ 2 3 4 5 6 7 10 12 13 15 16 19 20 22 23] OK
[ 2 3 4 6 7 8 9 10 11 12 13 14 15 16 17] NOK
. . .
If the 7 numbers from lower matrix matches inside some row from 15 numbers higher matrix, store the result from higher matrix.
It should analyze each row from higher matrix.I have two matrices with different sizes and I need to find the lower matrix inside the higher matrix.
Example
– Lower Matrix (Unique [1×7])
[ 2 3 4 5 6 7]
– Higher Matrix (Several results [1000×15])
[ 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16] OK
[ 2 3 4 5 6 7 10 12 13 15 16 19 20 22 23] OK
[ 2 3 4 6 7 8 9 10 11 12 13 14 15 16 17] NOK
. . .
If the 7 numbers from lower matrix matches inside some row from 15 numbers higher matrix, store the result from higher matrix.
It should analyze each row from higher matrix. I have two matrices with different sizes and I need to find the lower matrix inside the higher matrix.
Example
– Lower Matrix (Unique [1×7])
[ 2 3 4 5 6 7]
– Higher Matrix (Several results [1000×15])
[ 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16] OK
[ 2 3 4 5 6 7 10 12 13 15 16 19 20 22 23] OK
[ 2 3 4 6 7 8 9 10 11 12 13 14 15 16 17] NOK
. . .
If the 7 numbers from lower matrix matches inside some row from 15 numbers higher matrix, store the result from higher matrix.
It should analyze each row from higher matrix. contains, matrix array MATLAB Answers — New Questions