Question: Only27, please do it using Matlab Scanned by CamScanner ection Statements for the appropriate quantities le.g, the radius of the circlel and then prints its
Only27, please do it using Matlab Scanned by CamScanner ection Statements for the appropriate quantities le.g, the radius of the circlel and then prints its area. If the user enters an invalid choice, the script simply prints an error mes sage. The script should use a nested if-else statement to accomplish this. Here are two examples of running it lunits are assumed to be inches). >>areaMenu Menu 1. Cylinder 2. Circle 3. Rectangle Please choose onei 2 Enter the radius of the circle: 4.1 The area is 52.81 >>areaMenu Menu 1. Cylinder 2. Circle 3. Rectangle Please choose one: 3 Enter the length: 4 Enter the width: 6 The area is 24.00 26. Modify the areaMenu script to use a switch statement to decide which area to 27. Write a script that will prompt the user for a string and then print whether it was 28. Simplify this statement: calculate. empty or not. if iskeyword ('else')1 disp( Cannot use as a variable name end Store a value in a variable and then use isa to test to see whether or not it is the type double. 29. 0 Write a function called makemat that will receive two row vectors as and from them create and return a matrix with two rows arguments, may not assume that the length of the vectors is known. Also may be of different lengths. If that is the case, add O's to the end of one vector first to make it as long as the other. For example, a call to the function You might be >>makemat ( 1 : 42: 7)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
