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 170175

Submitted on 29 Nov 2012 by Evan

Correct

18Size
Leading solution size is 7.
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
 
%%
assert(isequal(howmonitors(),size(get(0,'MonitorPosition'),1)))
a =
           BeingDeleted: 'off'
             BusyAction: 'queue'
          ButtonDownFcn: ''
         CallbackObject: []
               Children: [0x1 double]
               Clipping: 'on'
      CommandWindowSize: [102 48]
              CreateFcn: ''
          CurrentFigure: []
              DeleteFcn: ''
                  Diary: 'off'
              DiaryFile: 'diary'
                   Echo: 'off'
     FixedWidthFontName: 'Courier New'
                 Format: 'short'
          FormatSpacing: 'loose'
       HandleVisibility: 'on'
                HitTest: 'on'
          Interruptible: 'on'
               Language: 'en_us'
       MonitorPositions: [0 0 1600 1200]
                   More: 'off'
                 Parent: []
        PointerLocation: [801 600]
         RecursionLimit: 500
            ScreenDepth: 24
    ScreenPixelsPerInch: 90
             ScreenSize: [1 1 1600 1200]
               Selected: 'off'
     SelectionHighlight: 'on'
      ShowHiddenHandles: 'off'
                    Tag: ''
                   Type: 'root'
          UIContextMenu: []
                  Units: 'pixels'
               UserData: []
                Visible: 'on'
ans =
     1