Question: Help with Matlab Learn how the case statement works. Write a script using the case statement (you CANNOT use if-else statements) that performs the same
Learn how the "case" statement works. Write a script using the "case" statement (you CANNOT use "if-else" statements) that performs the same task as the following code. n = input('Enter a number: '): if n == -1 disp('negative one'): elseif n == 0 disp('zero'): elseif n == 1 disp('positive one'): else disp('other value'): end
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
