How to convert a normailized matlab position vector to a pixel vector?
조회 수: 6 (최근 30일)
이전 댓글 표시
For example I want to convert this normalized position vector [0.344411732320906 0.525876575845238 0.127962249643902 0.1299373245] to pixels.
I have a Matlab function that requires the vector to be in pixels. I use "file", "generate code" to get the position of a text box in Matlab normalized units per my example. I need to convert this vector of normalized units to units of pixels.
댓글 수: 2
UJJWAL
2015년 8월 10일
You question is poorly framed and is not clear.
What do you mean by this conversion ? What are your expected results or outcomes ? Without these clarifications, there is nothing in your question to attract any useful answers.
채택된 답변
Azzi Abdelmalek
2015년 8월 10일
편집: Azzi Abdelmalek
2015년 8월 10일
figure
set(gcf,'units','pixel')
pos=get(gcf,'position')
You can choose one of these options {'inches' 'centimeters' 'characters' 'normalized' 'points' 'pixels'}
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Characters and Strings에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!