Borrar filtros
Borrar filtros

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

4 visualizaciones (últimos 30 días)
Selvaraaju Murugesan
Selvaraaju Murugesan el 5 de Abr. de 2013
I need to draw a line of exactly 1cm and 1.01 cm in the figure window? Any ideas?

Respuestas (2)

Walter Roberson
Walter Roberson el 5 de Abr. de 2013

Jan
Jan el 5 de Abr. de 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 comentario
Walter Roberson
Walter Roberson el 5 de Abr. de 2013
PixelsPerInch is usually nominal, and does not take into account the user playing with the monitor controls.

Iniciar sesión para comentar.

Categorías

Más información sobre Interactive Control and Callbacks en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by