user input in the while loophere is an


User input in the while loop:

Here is an illustration of running this script:

>> readonenum

Enter a positive number: -5

Invalid! Enter a positive number: -2.2

Invalid! Enter a positive number: c

??? Error using ==> input

Undefined function or variable 'c'.

Invalid! Enter a positive number: 44

Thanks, you entered a 44.0

Note that the MATLAB itself catches the character input and prints an error message and repeats the prompt whenever the c was entered.

 

 

 

Request for Solution File

Ask an Expert for Answer!!
Applications of MATLAB: user input in the while loophere is an
Reference No:- TGS0174925

Expected delivery within 24 Hours