Q:

Write a script will prompt the user for a keyword in MATLAB, error-

0

Write a script will prompt the user for a keyword in MATLAB, error-checking until a keyword is entered.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Ch5Ex22.m

keyw = input('Please enter a MATLAB keyword: ', 's');

while ~iskeyword(keyw)

 keyw = input('Seriously, enter a MATLAB keyword: ', 's');

end

fprintf('Indeed, %s is a keyword!\n', keyw)

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now