Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

38
Task/Menu/MATLAB/menu.m Normal file
View file

@ -0,0 +1,38 @@
function sucess = menu(list)
if numel(list) == 0
sucess = '';
return
end
while(true)
disp('Please select one of these options:');
for i = (1:numel(list))
disp([num2str(i) ') ' list{i}]);
end
disp([num2str(numel(list)+1) ') exit']);
try
key = input(':: ');
if key == numel(list)+1
break
elseif (key > numel(list)) || (key < 0)
continue
else
disp(['-> ' list{key}]);
end
catch
continue
end
end
sucess = true;
end