matlab gives wrong graphical display info

5 views (last 30 days)
my laptop have a square pixels.
when i use the groot function to get the screen pixels per linear inch (PPI) and the screen resolution,
i get PPI=96 and screen resolution=1536 x 864 px,
screen width length in inches=screen width resolution/PPI=1536/96=16 inches.
screen height length in inches=screen height resolution/PPI=864/96=9 inches.
while measuring my screen size by PHYSICAL ruler results, screen size=13.4 x 7.7 inches roughly.
can anyone tell me why matlab gives me this results?
beside i figured out how to measure screen pixels per linear inch or (PPI) PHYSICALLY by capturing an image of the laptop screen next to ruler and find how much pixels there is in one inch and roughly the result was 140 pixels per linear inch, (i did this step alot of times and i am confident of that value).
finally using my results
PPI=140
screen width=13.4
screen height=7.5
resolution=1876 x 1078 px, subjected to some error of course.
which is very close to my native resolution 1920 x 1080 px which i saw it printed on my laptop specs sheet.
no matter the way i looking at the problem matlab seems to give me some wierd results please i need a full explaination for this because i want to do some GUI resizing stuff.

Accepted Answer

Walter Roberson
Walter Roberson on 23 Feb 2021
Edited: Walter Roberson on 23 Feb 2021
  3 Comments
Charles Greenspon
Charles Greenspon on 29 Mar 2022
For what it's worth, though I understand the desired here, because the pixel scaling is explicitly incorrect for some monitors it means that if you define the position in any unit, when it shows up on your screen it just isn't accurate. It's all well and good to say that it's the same when you export it but that not exactly ideal for rapid iteration and making nice figures.

Sign in to comment.

More Answers (0)

Products


Release

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by