This change has been incorporated into the documentation in Release 2009a (R2009a). For previous releases, read below for any additional information:
HTML documentation for QUESTDLG function in MATLAB 7.6 (R2008a) does not include an example.
In this case, refer to the 'help' documentation instead for an example by executing the following at the MATLAB command prompt:
This will bring up the following example text that is instructive of how to create a question dialog:
ButtonName = questdlg('What is your favorite color?', ...
'Color Question', ...
'Red', 'Green', 'Blue', 'Green');
switch ButtonName,
case 'Red',
disp('Your favorite color is Red');
case 'Blue',
disp('Your favorite color is Blue.')
case 'Green',
disp('Your favorite color is Green.');
end
Best Answer