How to convert a normailized matlab position vector to a pixel vector?
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Al
le 10 Août 2015
Modifié(e) : Azzi Abdelmalek
le 10 Août 2015
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 commentaires
UJJWAL
le 10 Août 2015
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.
Réponse acceptée
Azzi Abdelmalek
le 10 Août 2015
Modifié(e) : Azzi Abdelmalek
le 10 Août 2015
figure
set(gcf,'units','pixel')
pos=get(gcf,'position')
You can choose one of these options {'inches' 'centimeters' 'characters' 'normalized' 'points' 'pixels'}
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Characters and Strings dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!