Question: The Question; Use generalized code - i.e. the program should work if the matrix size mentioned in point 2 changes: 1. In the first line

 The Question; Use generalized code - i.e. the program should work

The Question; Use generalized code - i.e. the program should work if the matrix size mentioned in point 2 changes: 1. In the first line of code write the following comment line your_username, ie. bamullan 2. Define a 2x6 matrix called 'yourlastnane', i.e. Mullany, and assign values of your choice to all 12 matrix positions. 3. Ask the user to guess the number of elements in the matrix. 4. Based on the input from point 3, write code the does the following 1. If they guessed the number of elements correctly, ask them to then guess the number of rows in the matrix. If they guess this correctly tell them so via a message displayed on the screen, similarly if they guess incorrectly. 2. If they guess the number of elements incorrectly let them know they got it wrong 5. Before the program ends use one single fprintf statement to both report the number of rows and columns in the matrix. Permitted MATLAB commands - use of other commands will result in a grade of zero (0) clc and clear fprintf() size() if-elseif-else-end disp() input)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!