subplus.m
来自「演示matlab曲线拟和与插直的基本方法」· M 代码 · 共 14 行
M
14 行
function y = subplus(x)
%SUBPLUS Positive part.
%
% x , if x>=0
% y = subplus(x) := (x)_{+} = ,
% 0 , if x<=0
%
% returns the positive part of X. Used for computing truncated powers.
% Carl de Boor 26 nov 88; 6sep97 (switch to use of MAX)
% Copyright 1987-2003 C. de Boor and The MathWorks, Inc.
% $Revision: 1.14 $
y=max(x,zeros(size(x)));
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?