Question: Consider an array, a = [19 2 3 4 55 6 7 8 91]. Now write down a MATLAB program using if-else, for, and/or while

Consider an array, a = [19 2 3 4 55 6 7 8 91]. Now write down a MATLAB program using if-else, for, and/or while loop which will transform this array into a square matrix like below. 119 3 (Ex: output will be 4 55 6 D 91. 2 7 8 8. Repeat previous problem (8) in opposite way, means input will be square matrix, output will be an array. EEE 221. ETE 221 Lab (NSU) Lab Instructor: Mehrab Hossain Likhon Email: mehrab.hossain @ northsouth.edu 9. Consider an array, m=[11 14 21 44 57]. Now write down a MATLAB program using if-else, for, and/or while loop which will transform this array into a square matrix like below. r57 0 0 0 0 0 44 0 0 0 (Ex: output will be o 0 21 0 0 1 0 0 8 14 0 0 0 0 0 11 10. Write a MATLAB program which will take the value of a radius \"r\" of a circle / sphere from user. Then i. If the user press 'a', the program will find the area of the circle ii. If the user press 'v', the program will find the volume of the sphere iii. If the user press 's', the program will find the surface area of the sphere




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 Programming Questions!