matlab 的解函数的不同方式 f=@(x)(sin(x)+2*x); f(pi/2) f=sym('sin(x)+2*x'); subs(f,'x',pi/2) %将 g 表达式中的符号变量 s 用 数值 f 替代 f=inline('sin(x)+2*x'); f(pi/2)