The Data Tip Text Update Function

조회 수: 3 (최근 30일)
ruprecht precht
ruprecht precht 2011년 6월 28일
pos = get(event_obj,'Position');
x = pos(1); y = pos(2);
output_txt = {['Y: ',num2str(y,4)]};
is straight out of the documentation, but for the life of me i can not figure how to get the following to work:
output_txt{end+1} = {['X: ',num2str(x,4)]};
i have tried all sort of things to num2str(x,???) to no avail. any insight is appreciated.

채택된 답변

Fangjun Jiang
Fangjun Jiang 2011년 6월 28일
I think it should be:
output_txt{end+1} = ['X: ',num2str(x,4)];
  댓글 수: 1
ruprecht precht
ruprecht precht 2011년 6월 28일
you are amazing. i can see now that the fist out_txt is the only one with {} because of the {end+1}. thanks so much.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Array Geometries and Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by