实验8 Matlab符号计算.docx
- 文档编号:8286593
- 上传时间:2023-01-30
- 格式:DOCX
- 页数:14
- 大小:45.41KB
实验8 Matlab符号计算.docx
《实验8 Matlab符号计算.docx》由会员分享,可在线阅读,更多相关《实验8 Matlab符号计算.docx(14页珍藏版)》请在冰豆网上搜索。
实验8Matlab符号计算
实验8Matlab符号计算
实验目的:
1、掌握定义符号对象的方法;
2、掌握符号表达式的运算法则以及符号矩阵运算。
3、掌握求符号函数极限及导数的方法。
4、掌握求符号函数定积分和不定积分的方法。
实验内容:
1.已知x=6,y=5,利用符号表达式求
x=6;y=5;
>>symsxyz
>>x=6;y=5
y=
5
>>z=(x+1)/(sqrt(3+x)-sqrt(y))
z=
9.1631
2.分解因式。
(1)
;
symsxy
>>factor(x^4-y^4)
ans=
(x-y)*(x+y)*(x^2+y^2)
(2)
symsx
>>factor(125*x^6+75*x^4+15*x^2+1)
ans=
(5*x^2+1)^3
3.化简表达式
(1)
;
symsab
>>simple(sin(a)*cos(b)-cos(a)*sin(b))
simplify:
sin(a)*cos(b)-cos(a)*sin(b)
radsimp:
sin(a)*cos(b)-cos(a)*sin(b)
combine(trig):
sin(a-b)
factor:
sin(a)*cos(b)-cos(a)*sin(b)
expand:
sin(a)*cos(b)-cos(a)*sin(b)
combine:
sin(a-b)
convert(exp):
-1/2*i*(exp(i*a)-1/exp(i*a))*(1/2*exp(i*b)+1/2/exp(i*b))+1/2*i*(1/2*exp(i*a)+1/2/exp(i*a))*(exp(i*b)-1/exp(i*b))
convert(sincos):
sin(a)*cos(b)-cos(a)*sin(b)
convert(tan):
2*tan(1/2*a)/(1+tan(1/2*a)^2)*(1-tan(1/2*b)^2)/(1+tan(1/2*b)^2)-2*(1-tan(1/2*a)^2)/(1+tan(1/2*a)^2)*tan(1/2*b)/(1+tan(1/2*b)^2)
collect(b):
sin(a)*cos(b)-cos(a)*sin(b)
ans=
sin(a-b)
(2)
symsx
>>simplify((4*x^2+8*x+3)/(2*x+1))
ans=
2*x+3
simple((4*x^2+8*x+3)/(2*x+1))
simplify:
2*x+3
radsimp:
2*x+3
combine(trig):
2*x+3
factor:
2*x+3
expand:
4/(2*x+1)*x^2+8/(2*x+1)*x+3/(2*x+1)
combine:
(4*x^2+8*x+3)/(2*x+1)
convert(exp):
(4*x^2+8*x+3)/(2*x+1)
convert(sincos):
(4*x^2+8*x+3)/(2*x+1)
convert(tan):
(4*x^2+8*x+3)/(2*x+1)
collect(x):
(4*x^2+8*x+3)/(2*x+1)
ans=
2*x+3
4.已知
完成下列运算:
(1)
.
symsP1P2ABabcdefghi
>>A=[abc;def;ghi];
>>P1=[010;100;001];
>>P2=[100;010;101];
>>B=[P1*P2*A]
B=
[d,e,f]
[a,b,c]
[a+g,b+h,c+i]
b1=
[(i*b-c*h)/(i*d*b-d*c*h-i*a*e+a*f*h+g*e*c-g*f*b),(-e*c-i*e+f*b+f*h)/(i*d*b-d*c*h-i*a*e+a*f*h+g*e*c-g*f*b),-(-e*c+f*b)/(i*d*b-d*c*h-i*a*e+a*f*h+g*e*c-g*f*b)]
[-(i*a-c*g)/(i*d*b-d*c*h-i*a*e+a*f*h+g*e*c-g*f*b),-(-d*c-i*d+f*a+f*g)/(i*d*b-d*c*h-i*a*e+a*f*h+g*e*c-g*f*b),(-d*c+f*a)/(i*d*b-d*c*h-i*a*e+a*f*h+g*e*c-g*f*b)]
[(a*h-b*g)/(i*d*b-d*c*h-i*a*e+a*f*h+g*e*c-g*f*b),(-d*b-d*h+e*a+e*g)/(i*d*b-d*c*h-i*a*e+a*f*h+g*e*c-g*f*b),-(-d*b+e*a)/(i*d*b-d*c*h-i*a*e+a*f*h+g*e*c-g*f*b)]
(2)B的逆矩阵并验证结果。
simple(B*B1)
simplify:
[1,0,0]
[0,1,0]
[0,0,1]
radsimp:
[1,0,0]
[0,1,0]
[0,0,1]
combine(trig):
[1,0,0]
[0,1,0]
[0,0,1]
factor:
[1,0,0]
[0,1,0]
[0,0,1]
expand:
[1/(i*d*b-d*c*h-i*a*e+a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:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 实验8 Matlab符号计算 实验 Matlab 符号 计算
![提示](https://static.bdocx.com/images/bang_tan.gif)