Is the anyone can explain this scaling function?
Afficher commentaires plus anciens
I try to understand this scaling code. Maybe it is simple for you all, but seriously, I did not understand it. Here are the codes.
handles.data.Scale = floor(100/ ...
max(size(handles.data.J,1)/Position(4), ...
size(handles.data.J,2)/Position(3)))/100;
I do not know what is the function of each number.
2 commentaires
Stephen23
le 20 Mai 2018
Thanks to enlighten and give me the idea to find out the solution. can you explain what it should be for no.1 and 2 in the codes?
What is "it" and to what does "no.1 and 2 in the codes" refer to?
If by the latter you mean the arguments to the size function, see
doc size % for the syntax
and if that's new ground for you, I suggest to start with the "Getting Started" section in the documentation and work through the introductory sections on basic Matlab operations and syntax.
Réponses (1)
dpb
le 17 Mai 2018
0 votes
Well, we don't really either without what the handles.data.J are, but one can presume the Position variable is the axes 'Position' property array in which third/fourth elements are axes width and height, respectively so that the computed scale value is computing the ratio of rows to height and columns to width and picking the larger.
Use the debugger and set a breakpoint on the code and observe the calculation inputs and result and then see where/how the result is used and all will probably become clear.
Catégories
En savoir plus sur Annotations dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!