CellOrNoCellRef

버전 1.0.0.0 (488 Bytes) 작성자: Michael Robbins
Use it to reduce awkward constructs
다운로드 수: 1.8K
업데이트 날짜: 2005/7/27

라이선스 없음

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

인용 양식

Michael Robbins (2024). CellOrNoCellRef (https://www.mathworks.com/matlabcentral/fileexchange/8120-cellornocellref), MATLAB Central File Exchange. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R12.1
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Cell Arrays에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0