📄 compare.m
字号:
% COMPARE Function to plot two vectors of different scales on same x axis
%
% COMPARE (y1, y2) plots y1 and y2 using the index of y1 as x axis
%
% COMPARE (x1, y1, y2) plots y1 and y2 using x1 as x axis
%
function [] = compare(varargin);
plot(varargin{1:nargin-1});
H = ishold;
hold on;
axis tight;
a = axis;
axis auto;
x = a(1):(a(2)-a(1))/(length(varargin{nargin})-1):a(2);
plot(x,varargin{nargin});
if (H == 0)
hold off;
end;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -