screen size should not be effected by the resolution
4 views (last 30 days)
Show older comments
I want to change my screen size, means I want to change the system from laptop to desktop where the screen size is different and without changing the present resolution I want to run the code properly. I.e The display should be unaffected by the resolution. Can we code this type of thing in MATLAB?
0 Comments
Answers (1)
Walter Roberson
on 9 Apr 2021
The changes to MATLAB to make it less dependent on screen resolution, are not active until a certain minimum resolution, so if the code was developed for a laptop that was below that resolution then the result will look different on another system that is above that resolution.
The traditional way to ensure resolution compatibility was to code in terms of "points", which where defined as 1/72 of an inch (except when they were traditionally defined as a number quite close to that, like 1/72.01). Unfortunately some fairly recent changes to MATLAB redefined the "points" units if I recall correctly.
The way MATLAB handles resolution defines 100 virtual pixels per inch for Windows, but 72 virtual pixels per inch for Mac (and resolution is left up to the operating system in Linux.)
I know that when I am working on my desktop, I do not want the same proportions as for my laptop: my laptop is suitable for working one "page" at a time but is not as tall as I like, so on my desktop I work two distinct applications side by side. Having made the MATLAB area twice as tall, in order to keep the same proportions I would have to make it twice as wide, which I don't want.
2 Comments
Walter Roberson
on 11 Apr 2021
No that is not possible.
For a number of graphics objects you can set the units to percent, but some important cases are not covered for that. And the percentage is relative to the container not relative to the screen.
Coding everything in percentage is almost always wrong for humans. As screen sizes and resolution increase, then humans prefer text that does not get much bigger (or smaller): humans have a preferred angular resolution for text. But as screen sizes and resolution increase, humans like to put more graphic data on the, and more image resolution but also larger images. What humans rarely want is to have a higher resolution / larger screen to act like a "magnifying glass".
See Also
Categories
Find more on Get Started with MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!