hline.m

来自「偏最小二乘算法在MATLAB中的实现」· M 代码 · 共 16 行

M
16
字号
function hline(x,lt)
%HLINE Adds a horizontal line to current graph at specified location
%  I/O syntax is: hline(x) where x is the specified location
%  Note: HLINE will leave the plot in the original hold state.
z = axis;
i = ishold;
hold on
if nargin == 1
  plot([z(1) z(2)],[x x],'-g')
else
    plot([z(1) z(2)],[x x],lt)
end
if i == 0
  hold off
end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?