Is the anyone can explain this scaling function?

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

Azimah Awang's "Answer" moved here:
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?
dpb
dpb 2018년 5월 20일
편집: dpb 2018년 5월 20일
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.

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

답변 (1개)

dpb
dpb 2018년 5월 17일

0 개 추천

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.

카테고리

도움말 센터File Exchange에서 Time Series Events에 대해 자세히 알아보기

태그

질문:

2018년 5월 17일

편집:

dpb
2018년 5월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by