clcclearx=input('Please enter a number:');switch x case 0 disp("You have entered 0"); case 2 disp("Your number is even and prime."); case (3 5 7) disp("Your number is prime"); otherwise disp("Invalid number");end
MATLAB: I know this is an invalid expression on line 9. How to correct this error? Also, what error is this exactly? Matlab displayed multiple possibilities when trying to correct it.
errorMATLAB
Related Question
- How to categorize a range
- If and elseif statement with unexpected error that I cannot figure out
- Help with if construct error
- Problem with for loop on MATLAB
- Use while loops for a function to keep asking for inputs, until an invalid input is entered
- EDIT:(Getting a Different Error Now: ” Index exceeds matrix dimensions”.) >>User Inputed Word–> Yields a corresponding number.
Best Answer