Problem 43276. Get Cody's screen size

Solution 1577302

Submitted on 6 Jul 2018 by David Verrelli
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
Codys_screen_size = get(0,'screensize'); Codys_screen_size = Codys_screen_size(3:4); y = getCody(); assert(~isnumeric(y)) sz = get(y,'screensize'); sz = sz(3:4); assert(isequal(sz, Codys_screen_size)) disp(sz)

ans = Graphics Root with properties: CurrentFigure: [0×0 GraphicsPlaceholder] ScreenPixelsPerInch: 100 ScreenSize: [1 1 1600 1200] MonitorPositions: [1 1 1600 1200] Units: 'pixels' Show all properties 1600 1200

Suggested Problems

More from this Author15

Community Treasure Hunt

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

Start Hunting!