필터 지우기
필터 지우기

How to access tools function

조회 수: 3 (최근 30일)
tomas
tomas 2012년 9월 4일
Hello everybody,
is it possible to get access to individual tools function. I need to get some information about Data Cursor tool and also modify it little bit.
Thankx for your help,
Tom

답변 (2개)

Jan
Jan 2012년 9월 4일
편집: Jan 2012년 9월 4일
You can find out, if the function is implemented as M-file, such that you can modify a copy of it:
profile on
% Now perform the actions using the buttons or menus
profile report
Now you find information about the used functions and can set breakpoints for a deeper inspection during you use the tool the next time.
[EDITED] I assume creating a new data cursor tool matching your needs is more efficient than changing the original function. Did you look in the FileExchange, if somebody did this already?

Walter Roberson
Walter Roberson 2012년 9월 4일
Tracing the data cursor tool is tricky because the object that you click on in the menu area, has had its callback set to be a method of an object, and not a static function.
I usually find it easiest to use the documentation in datacursormode to set an UpdateFcn to my own routine, and set a breakpoint in that routine, and then to trace back from there when the breakpoint is hit. You get deep into some undocumented object class definitions whose few comments assume that you have a design document available to you but which in fact is only available to Mathworks staff.
If you are unable to do your changes just by setting an UpdateFcn then you are likely to get lost in the internal code very quickly. It is not intended to be altered or understood by users.

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by