What does this code mean set(0,'Units','Pixels');

14 views (last 30 days)
What does this code mean set(0,'Units','Pixels');

Accepted Answer

Star Strider
Star Strider on 20 Sep 2014
I believe it sets the root object (the computer screen) 'Units' property to 'Pixels' (the default).

More Answers (1)

Guillaume
Guillaume on 20 Sep 2014
Edited: Guillaume on 20 Sep 2014
0 is the root of all graphics objects. So this sets the Unit property of the root to pixels. See this page for a full description of all the properties of the root.
In this case, it sets the unit for the values returned by ScreenSize and PointerLocation to pixel (the default).
  3 Comments
Guillaume
Guillaume on 20 Sep 2014
It's a bit sad you accepted a less detailed answered as the right one :(
Erum
Erum on 1 Oct 2014
I m new to matlab. so i was thinking to accept both. i was not aware that i can only accept one. so by mistake i accepted that at first. your answer was pretty helpful. Thats why i thank you.

Sign in to comment.

Categories

Find more on Graphics Object Properties in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!