Menu

#1 Handling Inputs

open
nobody
None
5
2010-05-24
2010-05-24
Ian Gregory
No

Hello,
-When inputting an incorrect value the program quits.
-Instead, please wrap each waiting for user input command with something like the following.
-This will avoid the annoying issue of having to re-type everything.

Filename: SDE_Library_Setup.m

*PREVIOUS INPUT:
T = input('\nFinal time T: ');
if(isempty(T))
error('T must be specified');
end

*SUGGESTED CHANGE:
T='';
while (isempty(T))
T = input('\nFinal time T: ');
if (isempty(T))
disp('T must be specified');
end
end

kind regards,
Ian Gregory, Sydney.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.