CellOrNoCellRef
Aucune licence
CELLORNOCELL Use it to reduce awkward constructs
Turn this awkward looking thing:
docnames = get(handles.popupmenu_ChooseReport,'String');
if iscell(docnames)
docname = docnames{get(handles.popupmenu_ChooseReport,'Value')};
else
docname = docnames;
end;
Into this
docnames = get(handles.popupmenu_ChooseReport,'String');
docname = CellOrNoCellRef(docnames, ...
get(handles.popupmenu_ChooseReport,'Value'));
See Also cell cellfun
Key words cell cellstring array matrix
It's not fancy, but it works
Citation pour cette source
Michael Robbins (2025). CellOrNoCellRef (https://www.mathworks.com/matlabcentral/fileexchange/8120-cellornocellref), MATLAB Central File Exchange. Extrait(e) le .
Compatibilité avec les versions de MATLAB
Plateformes compatibles
Windows macOS LinuxCatégories
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Découvrir Live Editor
Créez des scripts avec du code, des résultats et du texte formaté dans un même document exécutable.
Version | Publié le | Notes de version | |
---|---|---|---|
1.0.0.0 |