필터 지우기
필터 지우기

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

조회 수: 4 (최근 30일)
Selvaraaju Murugesan
Selvaraaju Murugesan 2013년 4월 5일
I need to draw a line of exactly 1cm and 1.01 cm in the figure window? Any ideas?

답변 (2개)

Walter Roberson
Walter Roberson 2013년 4월 5일

Jan
Jan 2013년 4월 5일
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
Walter Roberson
Walter Roberson 2013년 4월 5일
PixelsPerInch is usually nominal, and does not take into account the user playing with the monitor controls.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by