Extract a range of a given cell array
Mostrar comentarios más antiguos
I would like, trough a GUI, e.g.:
prompt={'Insert range'}
defans={'Insert range'}
fields = {'num'}
info = inputdlg(prompt, 'Insert handrange', 1, defans)
if ~isempty(info)
info = cell2struct(info,fields)
mynum = str2num(info.num)
end
to extract a range of a given cell array, say:
cellarray={'A','B','C','D','E','F','G','H','I','J','K','L'};
in three different ways:
a) 30 [i.e. 0-30%]
b) 3-7 [i.e. 3-7%]
c) 40- [i.e. 40-100%]
Note that I would like to use a symbol (in this case "-" to denote case c).
How do I make Matlab choose 0-30% using '30' and so forth for the cases b) and c) ?
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Descriptive Statistics en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!