Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Solution 329858

Submitted on 7 Oct 2013 by @bmtran

Correct

24Size
Leading solution size is 20.
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test
Code Input and Output
1
Pass
 
%%
h=msgbox('Click the OK button','');
clickOK();
assert(ishandle(h),'do not simply delete the figure');
drawnow;
assert(~ishandle(h),'failed to click the OK button');
[Warning: Function drawnow has the same name as a MATLAB builtin. We suggest you rename the function
to avoid a potential name conflict.]
[> In clickOK at 5
  In verifyCode>evaluateCode at 231
  In verifyCode at 40
  In fevalJSON at 14]
[Warning: Function license has the same name as a MATLAB builtin. We suggest you rename the function
to avoid a potential name conflict.]
[> In clickOK at 5
  In verifyCode>evaluateCode at 231
  In verifyCode at 40
  In fevalJSON at 14]
[Warning: Function mex has the same name as a MATLAB builtin. We suggest you rename the function to
avoid a potential name conflict.]
[> In clickOK at 5
  In verifyCode>evaluateCode at 231
  In verifyCode at 40
  In fevalJSON at 14]
[Warning: Function home has the same name as a MATLAB builtin. We suggest you rename the function to
avoid a potential name conflict.]
[> In clickOK at 5
  In verifyCode>evaluateCode at 231
  In verifyCode at 40
  In fevalJSON at 14]
[Warning: Function keyboard has the same name as a MATLAB builtin. We suggest you rename the function
to avoid a potential name conflict.]
[> In clickOK at 5
  In verifyCode>evaluateCode at 231
  In verifyCode at 40
  In fevalJSON at 14]
[Warning: Function more has the same name as a MATLAB builtin. We suggest you rename the function to
avoid a potential name conflict.]
[> In clickOK at 5
  In verifyCode>evaluateCode at 231
  In verifyCode at 40
  In fevalJSON at 14]
[Warning: Function pause has the same name as a MATLAB builtin. We suggest you rename the function to
avoid a potential name conflict.]
[> In clickOK at 5
  In verifyCode>evaluateCode at 231
  In verifyCode at 40
  In fevalJSON at 14]
[Warning: Function simulink has the same name as a MATLAB builtin. We suggest you rename the function
to avoid a potential name conflict.]
[> In clickOK at 5
  In verifyCode>evaluateCode at 231
  In verifyCode at 40
  In fevalJSON at 14]