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

clc
clear
x=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

Best Answer

Replace
case (3 5 7)
by
case {3,5,7}
With curly brackets
"what error is this" It's break the switch-case-otherwise syntax