|
|
[求助]
matlab求二元三次方程 已有1人参与
有一组二元三次方程,想要求得a和ε的值,用matlab运算,发现只有复数解,由于a和ε本身可以允许有误差,方程中6770.132和3941.435也可以有正负500的误差,所以我想用matlab求a和ε的约数,a的值在0~1之间、ε的值在1000~3000之间,只要能代入方程偏差不大即可。相当于这组数无限趋近,能在我的接受范围。还请大家赐教,谢谢!
以下是二元三次方程(绿色图片为二元三次方程组):
matlab程序代码如下,用b代替ε:
[a,b]=solve('6770.132=(4.17*a^2*(1-b)^2/b^3*1.4*10^-5*0.25)+(0.29*a*(1-b)/b^3*8.37*0.25^2)','3941.435=(4.17*a^2*(1-b)^2/b^3*1.4*10^-5*0.196)+(0.29*a*(1-b)/b^3*8.703*0.196^2)','a','b')
得出的结果如下:
警告: support of character vectors that are not valid variable names or define a number will be removed in a future release. to create symbolic
expressions, first create symbolic variables and then use operations on them.
> in sym>convertexpression (line 1559)
in sym>convertchar (line 1464)
in sym>tomupad (line 1216)
in sym (line 179)
in solve>geteqns (line 405)
in solve (line 225)
警告: support of character vectors that are not valid variable names or define a number will be removed in a future release. to create symbolic
expressions, first create symbolic variables and then use operations on them.
> in sym>convertexpression (line 1559)
in sym>convertchar (line 1464)
in sym>tomupad (line 1216)
in sym (line 179)
in solve>geteqns (line 405)
in solve (line 225)
警告: do not specify equations and variables as character vectors. instead, create symbolic variables with syms.
> in solve>geteqns (line 445)
in solve (line 225)
a =
-2153.8654367915894618926415071084
- 3123.0895646907707350229180631831 - 1192.7113132876986000825947006744i
- 3123.0895646907707350229180631831 + 1192.7113132876986000825947006744i
b =
- 0.36131483557811412999971700246919 - 1.1551442818685524875109192327699e-40i
0.1806574177890570649998585012346 + 0.31290782637484434808955229418758i
0.1806574177890570649998585012346 - 0.31290782637484434808955229418758i
![matlab求二元三次方程]()
无标题.jpg |
|