How to best to accept list input from a dialog box?
조회 수: 1 (최근 30일)
이전 댓글 표시
I have a project in which I would like to have the user input a list of numbers that represents column numbers of a cell array by using a dialog box, e.g. similiar to warndlg/
댓글 수: 0
답변 (2개)
Sean de Wolski
2012년 2월 3일
uicontrol('style','list','string',cellfun(@num2str,num2cell(1:10)','uni',false))
댓글 수: 0
Walter Roberson
2012년 2월 3일
inputdlg() accepts any string, including strings that contain commas or spaces. You can use str2num() or str2double() to convert the string representations in to numeric values.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Structures에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!