prompt = {'Number of weeks', 'Number of days', 'Hours', 'Minutes'};
dlgtitle = 'Enter estimated time';
dims = [1 45];
definput = {'0' '0' '0' '0'};
answer = inputdlg(prompt,dlgtitle,dims,definput);
Then you can convert the output (string) to numeric:
timeVec = cellfun(@str2double, answer);
timeVec(1)
timeVec(2)
Also, rather than using input(), you can better control the user's selection by using a list dialog. [indx,tf] = listdlg('PromptString', 'Select the log you intend to park in', ...
'SelectionMode', 'Single',...
'Name', 'Parking', ...
'ListSize', [160, 100], ...
'ListString', {'Short Term', 'Intermediate', 'Long Term', 'Economy'});
Best Answer