how to manage inputs in a dialogbox
조회 수: 1 (최근 30일)
이전 댓글 표시
prompt={'Enter the matrix size for x^2:',... 'Enter the colormap name:'};
name='Input for Peaks function';
numlines=1;
defaultanswer={'20','hsv'};
answer=inputdlg(prompt,name,numlines,defaultanswer);
IN THIS CODE INSTEAD OF using "defaultanswer" how to leave the textbox blank & also where will we see the stored answers ?
댓글 수: 0
답변 (1개)
Arthur
2013년 9월 11일
To leave the textbox blank, you can either do this:
defaultanswer = {'',''};
or this
answer=inputdlg(prompt,name,numlines);
You will find the answers in, well, answer. This will be a cell array, with answer{1} being the inserted string in box 1, and answer{2} the contents of box 2.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!