3 %> @brief Asks uses to type in dataset
class levels (for varying purposes).
6 %> @param data Dataset (@ref
irdata object)
7 %> @param title Dialog title
8 %> @param flag_all Whether to allow
"all" (empty vector) option.
9 %> @
return A structure containing the following fields: @c params; @c flag_ok
17 s_all =
' ([] = all)';
19 no_levels = size(cc, 2)-4;
26 p = inputdlg(sprintf(
'Enter class levels to keep (dataset has %d level%s)%s', no_levels, s_plural, s_all), title, 1, {
'[]'});
38 irerrordlg('Please type in a numerical vector!', 'Invalid input');
41 % If all not allowed, check if user specified all
43 irerrordlg('Empty vector not allowed!', 'Invalid input');
49 % Does not check if levels are valid, maybe that's too much, let error occur
52 result.params = {
'hierarchy', mat2str(idxs)};
58 % inputdlg returns an empty cell when cancelled
function ask_hierarchy(in data, in title, in flag_all)
function irerrordlg(in errorstring, in dlgname)
function classlabels2cell(in classlabels, in new_hierarchy)