Files
nappMATLAB-toolbox/Add-Ons/NewCallback.m
T
2023-08-09 15:02:10 +02:00

18 lines
715 B
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).
% vapour pressure over ice:
% Marti, J., and K. Mauersberger, Geophys. Res.Lett., 20, 363?366, 1993.
% gives parameterization from 169 - 273K in Pa. (log10(p)= A1/T+B)
A_1 = -2663.5;
B_1 = 12.537;
pos = get(event_obj,'Position');
output_txt = {['X: ',datestr(pos(1),0)],...
['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