查看结果数据类型
whos
S = sym('a^2+b');
b = 3;
R = subs(S)
结果
R = a^2+3
符号表达式替换
R = subs (S, old, new)
函数创建
一、M文件
function g = sincc(x)
if x==0
g = 1/3;
else
g = (sin(x)-x)/x;
end
调用1
sincc(0)
调用2
f = @sincc; %返回函数句柄
f(0)