Question: MATLAB PLEASE The MATLAB program below is written using if-elseif-else statement. Convert it to a case-switch statement. #This script asks the user for a type
The MATLAB program below is written using if-elseif-else statement. Convert it to a case-switch statement. #This script asks the user for a type of pizza % and prints which type to order using if-else while 1 my pick = menu('Pick a pizza', 'Cheese', 'Shroom', 'Sausage', 'No Pizza'); if my pick == 1 disp('Order a cheese pizza'') elseif mypick == 2 disp('Order a mushroom pizza'') else if my pick == 3 disp('Order a sausage pizza?') else disp('No pizza for us today'') dips(*Addio!!'') break; end end
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
