필터 지우기
필터 지우기

Using 'default' as default answer in inputdlg.

조회 수: 3 (최근 30일)
Adam Hicks
Adam Hicks 2017년 11월 20일
답변: Star Strider 2017년 11월 20일
I'm using an inputdlg prompt for user input and one of the options for another program I'm using is an input of the string 'default'. As such, I'd like one of my default answers for the user in the inputdlg to be the string 'default'. However, when I use 'default' as a default answer, inputdlg uses an empty string instead (I assume this is a keyword). Is there a way to ignore this so that 'default' may be used?
Example:
defans = {str,date,'default','',''};
output = inputdlg(prompt,dlg_title,num_lines,defans);

답변 (1개)

Star Strider
Star Strider 2017년 11월 20일
Using 'default' (with a lower-case ‘d’) appears to be prohibited. When I experimented with it, 'Default' and 'DEFAULT' displayed as expected.

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by