How to convert a normailized matlab position vector to a pixel vector?

12 ビュー (過去 30 日間)
Al
Al 2015 年 8 月 10 日
編集済み: Azzi Abdelmalek 2015 年 8 月 10 日
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
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.
Al
Al 2015 年 8 月 10 日
編集済み: Al 2015 年 8 月 10 日
How can I convert a matlab position vector in Matlabs normalized units ([left bottom width height]) to units of pixels? I expect that someone knows how to take a position vector in normalized units and convert to to pixels with a function or something. I am sorry you could not understand.

サインインしてコメントする。

採用された回答

Azzi Abdelmalek
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 件)

カテゴリ

Help Center および File ExchangeConvert Image Type についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by