?? f_clip.asv
字號:
fdsfunction y = f_clip (x,a,b,k,s)
% F_CLIP: Clip a value or a calling argument to an interval
%
% Usage: y = f_clip (x,a,b,k,s)
%
% Entry: x = input to be clipped
% a = lower limit of clip range
% b = upper limit of clip range
% k = an optional integer specifying the number of
% the calling argument
% s = an optional string specifying the name of the
% function being called.
%
% Exit: y = x clipped to interval [a,b]. If a <= x <= b,
% then y = x.
y = min(x,b);
y = max(y,a);
if (nargin >= 5) and y ~= x
fprintf ('\nCalling argument %d of %s was clipped to [%g,%g].\n',k,s,a,b);
end
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -