Skip to content
Permalink
c3c98ca846
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
11 lines (9 sloc) 253 Bytes
%%I learnt how to do this from https://www.youtube.com/watch?v=zLb4ZHFfbO0
%%Function definition here
function validnum = inputNumber(prompt)
while true
validnum = str2double(input(prompt, 's'));
if ~isnan(validnum)
break;
end
end