Question
Problem Statement: Write a script that finds a smaller user inputted matrix inside of a larger user inputted matrix. We will call this small user
Problem Statement: Write a script that finds a smaller user inputted matrix inside of a larger user inputted matrix. We will call this small user inputted matrix, the Waldo matrix, and the larger user inputted matrix the background matrix. Your script should check to make sure that neither dimension of the Waldo matrix is larger than the dimensions of the background matrix. If this is the case the script should repeat only the input for the Waldo Matrix until a new Waldo Matrix is entered whose dimensions are smaller than the background matrix. The program should then display the locations of where the Waldo matrices were found. (A matrix can have more than one Waldo in it.). (The location of a Waldo are the indexes of the top left element and the bottom right element in the background matrix where the Waldos occur.)
Coding Requirements: Allow for two user inputted matrices, the background matrix and the Waldo matrix. Warnings when the user inputs an improper Waldo matrix. You must use explicit loops to solve this problem, NO IMPLICIT LOOPS ARE ALLOWED. Your script must work for any size background matrix and any size Waldo matrix as long as they follow the rules in the problem statement.
This is done on the program MATLAB.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started