Try this:
num = str2double(input('Enter number: ','s')); if isnan(num) warning(...) end
Using try and catch is a bit of a sledgehammer approach.
Try this:
num = str2double(input('Enter number: ','s')); if isnan(num) warning(...) end
Using try and catch is a bit of a sledgehammer approach.
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!