exa3_16.m
来自「有关matlab r2007的实用教程」· M 代码 · 共 13 行
M
13 行
f=sym('a*x^2+b*x+c') % create a function f(x)
subs(f,'s','x') % substitute ‘s’ for ‘x’ in the expression f
subs(f,'alpha','a') % substitute ‘alpha’ for ‘a’ in f
g=sym('3*x^2+5*x-4') % create another function
h=subs(g,'x','2') % substitute '2’for ‘x’ in g
isstr(h) % show that the result is a symbolic expression
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?