Question
The purpose of this program is to identify data on a randomly generated set of numbers, which is deemed incorrect, for testing procedures. Any number
The purpose of this program is to identify data on a randomly generated set of numbers, which is deemed incorrect, for testing procedures. Any number greater than 90 is considered invalid data. If a number on the data set is found matching this criteria, then this value must be replaced with a 0. The user will have the choice to continue to generate random numbers to test, or to quit the program.
Create a function called randNum that accepts two integers M and N as input and returns a randomly generated MxN array A of floating point numbers in the interval (50-100). Write a script to ask a user to enter the dimensions of an array, M and N. The code should go through all elements on the array and check if there is a value or values greater than 90. If the values are found, those values should be replaced with a 0. After all numbers are evaluated, the array should be displayed. The user will also have to choose if to try again with a new set of numbers, or to quit. If the user inputs character "e", the program must exit. No other input will terminate the program. If the program enters the choise "c", the program will execute again. You MUST use a loop to manipulate the matrix. ____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