我加在Matlab的图形数据光标,这个它,当我点击所示的代码“编辑文字更新功能......”如何在Matlab图中添加希腊字母到数据光标?
function output_txt = myfunction(obj,event_obj)
% Display the position of the data cursor
% obj Currently not used (empty)
% event_obj Handle to event object
% output_txt Data cursor text string (string or cell array of strings).
pos = get(event_obj,'Position');
output_txt = {['X: ',num2str(pos(1),4)],...
['Y: ',num2str(pos(2),4)]};
% If there is a Z-coordinate in the position, display it as well
if length(pos) > 2
output_txt{end+1} = ['Z: ',num2str(pos(3),4)];
end
我想在这里做的是替换字符“X” ,'Y'由希腊字符'alpha'或'beta'。我怎样才能做到这一点?
谢谢!
可能的重复[如何在MATLAB中使用TeX/LaTeX格式化自定义数据提示?](http://stackoverflow.com/questions/1668071/how-do-i-use-tex-latex-formatting- for-custom-data-tips-in-matlab) – Amro
我认为这个问题听起来很熟悉! gnovice有一个很好的答案:http://stackoverflow.com/questions/1668071/how-do-i-use-tex-latex-formatting-for-custom-data-tips-in-matlab/1668559#1668559 – Doresoom