Azzera filtri
Azzera filtri

How to draw a line of exactly 1cm in Matlab?

4 visualizzazioni (ultimi 30 giorni)
Selvaraaju Murugesan
Selvaraaju Murugesan il 5 Apr 2013
I need to draw a line of exactly 1cm and 1.01 cm in the figure window? Any ideas?

Risposte (2)

Walter Roberson
Walter Roberson il 5 Apr 2013

Jan
Jan il 5 Apr 2013
I would even claim: This is not possible. Exactly 1 and 1.01 cm (what could "and" mean here? A line can have one length only?) does not explain, where this dimension should appear: On the screen, on your specific screen, on your screen after the magnifier of the operating system has been applied, when printed on paper?
The scaling of objects on your screen depends on the value of get(0, 'PixelsPerInch'). But obviously you are forced to draw pixels. Then it is unlikely (but not impossible), that 1.00 and 1.01 cm match exactly the pixel dimensions. And if the scline factor of your monitor is 92.03542 pixels per inch, you can be sure, that you only get rounded value 92 in your settings of Matlab and the OS.
Therefore the need for "exact dimensions" for objects drawn by Matlab is extremely complicated and at least near to impossible depending on the wanted precision.
  1 Commento
Walter Roberson
Walter Roberson il 5 Apr 2013
PixelsPerInch is usually nominal, and does not take into account the user playing with the monitor controls.

Accedi per commentare.

Categorie

Scopri di più su Interactive Control and Callbacks in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by