作业帮 > 数学 > 作业

MATLAB中subs是什么

来源:学生作业帮 编辑:灵鹊做题网作业帮 分类:数学作业 时间:2024/04/29 20:41:24
MATLAB中subs是什么
syms t;
f=sym('sin(t)/t');
f1=subs(f,t,t+3);
f2=subs(f1,t,2*t);
f3=subs(f2,t,-t);
subplot(2,2,1);ezplot(f,[-8,8]);grid on;
subplot(2,2,2);ezplot(f1,[-8,8]);grid on;
subplot(2,2,3);ezplot(f2,[-8,8]);grid on;
subplot(2,2,4);ezplot(f3,[-8,8]);grid on;
MATLAB中subs是什么
subs是赋值函数,用数值替代符号变量替换函数
例如: 输入subs(a+b,a,4) 意思就是把a用4替换掉,返回 4+b.