inline 函数
官方文档
inline Construct inline object.
inline will be removed in a future release. Use anonymous
functions instead.
inline(EXPR) constructs an inline function object from the
MATLAB expression contained in the string EXPR. The input
arguments are automatically determined by searching EXPR
for variable names (see SYMVAR). If no variable exists, 'x'
is used.
inline(EXPR, ARG1, ARG2, ...) constructs an inline
function whose input arguments are specified by the
strings ARG1, ARG2, ... Multicharacter symbol names may
be used.
inline(EXPR, N), where N is a scalar, constructs an
inline function whose input arguments are 'x', 'P1',
'P2', ..., 'PN'.
Examples:
g = inline('t^2')
g = inline('sin(2*pi*f + theta)')
g = inline('sin(2*pi*f + theta)', 'f', 'theta')
g = inline('x^P1', 1)
% 使用inline 创建初等函数的程序很简洁
%要计算多个点的函数值是,注意四种数组运算的使用
% 用法:
%1据expr