代码拉取完成,页面将自动刷新
同步操作将从 Dean/PIDtoolbox 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
function [output_txt] = PTdatatip(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).
% this is a minor modification of the Matlab datatip tool to display
% relevant units for this project, deg/s and time with ms precision
% - B. White
%
% ----------------------------------------------------------------------------------
% "THE BEER-WARE LICENSE" (Revision 42):
% <brian.white@queensu.ca> wrote this file. As long as you retain this notice you
% can do whatever you want with this stuff. If we meet some day, and you think
% this stuff is worth it, you can buy me a beer in return. -Brian White
% ----------------------------------------------------------------------------------
%
fontsz2=16;
try
a=event_obj.Target.Type;
c=event_obj.Target.Color;
catch
end
c1=[0.9300 0.5000 0.3000];
c2=[0.3000 0.6500 0.9500];
if ~strcmp(a,'image') % ugly workaround
pos = get(event_obj,'Position');
if pos(1)<100,
dgts=5;
else
dgts=6;
end
if pos(2) > -1200
output_txt = {['sec: ',num2str(pos(1),dgts)],...
['deg/s: ',num2str(pos(2),4)]};
else
output_txt = {['sec: ',num2str(pos(1),dgts)],...
['%: ',num2str(((pos(2)+2400) / 12),4)]};
end
% dataTipH=plot([pos(1) pos(1)], [-2400 2400],'r-');
% get(dataTipH)
if c==c1 | c==c2
output_txt = {['x: ',num2str(pos(1),4)],...
['y: ',num2str(pos(2),4)]};
end
% 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
set(findall(gcf,'type','hggroup'),'FontSize',fontsz2,'FontWeight', 'bold')
else
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
if strcmp(a,'image')
% pos = get(event_obj,'Position');
% output_txt = {['X: ',num2str(pos(1),4)],...
% ['Y: ',num2str(pos(2),4)]};
y=(obj.Parent.YLim(2)-pos(2)) / (.3);
output_txt = {['%T: ',num2str(pos(1),4)],...
['Hz: ',num2str(y,4)]};
z=event_obj.Target.CData(pos(2),pos(1));
output_txt{end+1} = ['Z: ',num2str(z,4)];
end
set(findall(gcf,'type','hggroup'),'FontSize',fontsz2,'FontWeight', 'bold')
end
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。