(Solved): 6. The Following MATLAB Script Interacts With The User To Get A Positive Number N And Then Tells The ...
6. The following MATLAB script interacts with the user to get a positive number N and then tells the user whether N is a prime number or not. N=input('Enter a positive N:') if isprime (N) ==1 disp('Prime number' ); elseif isprime (N)==0 disp('Not a prime number'); end -Type the program and try it. - Add commands between the first and the second line so that the error message "N must be positive" is shown in case N is not positive. - Replace the if/elseif/end set of commands by a set of switch/case/end commands in a way that the program retains its functionality.