Question: Create a new MATLAB Script file named M1P4.m. In your script file perform the following calculations: o Prompt the user to enter an arbitrary
Create a new MATLAB Script file named M1P4.m. In your script file perform the following calculations: o Prompt the user to enter an arbitrary 2D array of numbers. o Write a loop to iterate through all the rows in the array and change each row so that it contains only the first number from the row. For example, if the array is originally [1 2 3; 4 5 6], it would result in [1 1 1; 4 4 4] o Display the following message during each iteration where xx indicates the first number in the row o 'Changing row to a value of xx' o Display your resulting array.
Step by Step Solution
There are 3 Steps involved in it
Sure Heres the MATLAB script file M1P4m that performs the calculations you described matlab Prompt t... View full answer
Get step-by-step solutions from verified subject matter experts
