Professional Documents
Culture Documents
To Get Started, Select MATLAB Help or Demos From The Help Menu
To Get Started, Select MATLAB Help or Demos From The Help Menu
>> syms x
>> f=x^2
f=
x^2
>> f=x*cos(x)-2*x^2+3*x-1
f=
x*cos(x)-2*x^2+3*x-1
>> f(0)
>> subs(f,0)
ans =
-1
>> syms xabc
>> P=a*x^2+b*x+c
>> syms x a b c
>> P=a*x^2+b*x+c
P=
a*x^2+b*x+c
>> subs(P,(a,b,c),(1,2,3))
??? subs(P,(a,b,c),(1,2,3))
>> Subs(P,{a,b},{1,2})
ans =
x^2+2*x+c
>> f
f=
x*cos(x)-2*x^2+3*x-1
>> ezplot(f),grid on
>> limit(f,x,0)
ans =
-1
>> g=(x^2-1)/(x-1)
g=
(x^2-1)/(x-1)
>> limit(g,x,1)
ans =
2
>> f=floor(x)
f=
floor(x)
>> explot(f),grid on
>> ezplot(f),grid on
>> limit(f,x,1,righ')
>> limit(f,x,1,'right')
ans =
1
>> limit(f,x,1,'left')
ans =
>> limit(3*x^2+2*x+1)/(x^2+1),x,inf)
??? limit(3*x^2+2*x+1)/(x^2+1),x,inf)
>> limit((3*x^2+2*x+1)/(x^2+1),x,inf)
ans =
>> f=x*cos(x)-2*x^2+3*x-1
f=
x*cos(x)-2*x^2+3*x-1
>> diff(f)
ans =
cos(x)-x*sin(x)-4*x+3
>> syms x y
>> z=x^2+x*y+x+y+y^2
z=
x^2+x*y+x+y+y^2
>> diff(z,x)
ans =
2*x+y+1
>> diff(z,y)
ans =
x+1+2*y
>> syms x1 x2 x3
>> f1=3*x1-cos(x2*x3)-1/2
f1 =
3*x1-cos(x2*x3)-1/2
>> diff(f1,x1)
ans =
>> diff(f1,x2)
ans =
sin(x2*x3)*x3
>> subs(diff(f1,x2),(x1,x2,x3),(0,0,0))
??? subs(diff(f1,x2),(x1,x2,x3),(0,0,0))
|
Error: Incomplete or misformed expression or statement.
>> subs(diff(f1,x2),{x1,x2,x3},¨{0,0,0})
??? subs(diff(f1,x2),{x1,x2,x3},¨{0,0,0})
>> subs(diff(f1,x2),{x1,x2,x3},{0,0,0})
ans =
>> f2=x1^2-81*(x2+1/10)^2+sin(x3)+1.06
f2 =
x1^2-81*(x2+1/10)^2+sin(x3)+53/50
>> subs(diff(f2,x1),{x1,x2,x3},{0,0,0})
ans =