matlab中如何以x为自变量解三角函数方程组
来源:学生作业帮 编辑:大师作文网作业帮 分类:综合作业 时间:2024/11/16 08:13:18
matlab中如何以x为自变量解三角函数方程组
我写的代码是
[y,z]=solve('85+45*cos(y)+50*cos(z)=35*cos(x)','45*sin(y)+50*sin(z)=35*sin(x)','x')
但是解不出来
请问是怎么回事呢
我写的代码是
[y,z]=solve('85+45*cos(y)+50*cos(z)=35*cos(x)','45*sin(y)+50*sin(z)=35*sin(x)','x')
但是解不出来
请问是怎么回事呢
解方程f(x)=0的代码是:
solve('f(x)=0','x')或solve('f(x)','x')
变量缺省时,默认变量为x
方程组f(x,y)=0,g(x,y)=0的代码是
solve('f(x,y)=0','g(x,y)=0','x,y')
缺省变量时,默认变量为x,y
你要是只以x为变量是解不出来的
还有我看你代码的意图是以y,z为变量,以x为常量,用x表示y与z吧.
在方程组中只有变量与常量,是没有自变量的.
再问: 我想解的是85+45*cos(y)+50*cos(z)=35*cos(x)和45*sin(y)+50*sin(z)=35*sin(x)这两个方程,y、z并不显含x,那具体该怎么写呢?
再答: 你要的是不是这个 [y,z]=solve('85+45*cos(y)+50*cos(z)=35*cos(x)','45*sin(y)+50*sin(z)=35*sin(x)','y,z')
再问: 出现了一个zll还有warning,这是怎么回事呢?
再答: >> [y,z]=solve('85+45*cos(y)+50*cos(z)=35*cos(x)','45*sin(y)+50*sin(z)=35*sin(x)','y,z') y = atan(-5/9/(11328800*sin(x)^2+11520000)*(633080*sin(x)*cos(x)+8963080*sin(x)+7930160*sin(x)^3+40*(250493929*sin(x)^2*cos(x)^2+326963762160*sin(x)^2*cos(x)+131125592108*sin(x)^4*cos(x)-7762182169*sin(x)^2+14285786732*sin(x)^4+39304648516*sin(x)^6+196169500800*cos(x)+18149500800)^(1/2))+7/9*sin(x),1/18*(-3757-1190*sin(x)/(11328800*sin(x)^2+11520000)*(633080*sin(x)*cos(x)+8963080*sin(x)+7930160*sin(x)^3+40*(250493929*sin(x)^2*cos(x)^2+326963762160*sin(x)^2*cos(x)+131125592108*sin(x)^4*cos(x)-7762182169*sin(x)^2+14285786732*sin(x)^4+39304648516*sin(x)^6+196169500800*cos(x)+18149500800)^(1/2))-490*sin(x)/(11328800*sin(x)^2+11520000)*(633080*sin(x)*cos(x)+8963080*sin(x)+7930160*sin(x)^3+40*(250493929*sin(x)^2*cos(x)^2+326963762160*sin(x)^2*cos(x)+131125592108*sin(x)^4*cos(x)-7762182169*sin(x)^2+14285786732*sin(x)^4+39304648516*sin(x)^6+196169500800*cos(x)+18149500800)^(1/2))*cos(x)+1813*cos(x)+686*sin(x)^2*cos(x))/(49*sin(x)^2+240)) atan(-5/9/(11328800*sin(x)^2+11520000)*(633080*sin(x)*cos(x)+8963080*sin(x)+7930160*sin(x)^3-40*(250493929*sin(x)^2*cos(x)^2+326963762160*sin(x)^2*cos(x)+131125592108*sin(x)^4*cos(x)-7762182169*sin(x)^2+14285786732*sin(x)^4+39304648516*sin(x)^6+196169500800*cos(x)+18149500800)^(1/2))+7/9*sin(x),1/18*(-3757-1190*sin(x)/(11328800*sin(x)^2+11520000)*(633080*sin(x)*cos(x)+8963080*sin(x)+7930160*sin(x)^3-40*(250493929*sin(x)^2*cos(x)^2+326963762160*sin(x)^2*cos(x)+131125592108*sin(x)^4*cos(x)-7762182169*sin(x)^2+14285786732*sin(x)^4+39304648516*sin(x)^6+196169500800*cos(x)+18149500800)^(1/2))-490*sin(x)/(11328800*sin(x)^2+11520000)*(633080*sin(x)*cos(x)+8963080*sin(x)+7930160*sin(x)^3-40*(250493929*sin(x)^2*cos(x)^2+326963762160*sin(x)^2*cos(x)+131125592108*sin(x)^4*cos(x)-7762182169*sin(x)^2+14285786732*sin(x)^4+39304648516*sin(x)^6+196169500800*cos(x)+18149500800)^(1/2))*cos(x)+1813*cos(x)+686*sin(x)^2*cos(x))/(49*sin(x)^2+240))
再问: 那请问你安装的matlab版本是2011b么?会不会是我的版本的问题?
再答: 我的是matlab 7 ,这个应该不会吧
solve('f(x)=0','x')或solve('f(x)','x')
变量缺省时,默认变量为x
方程组f(x,y)=0,g(x,y)=0的代码是
solve('f(x,y)=0','g(x,y)=0','x,y')
缺省变量时,默认变量为x,y
你要是只以x为变量是解不出来的
还有我看你代码的意图是以y,z为变量,以x为常量,用x表示y与z吧.
在方程组中只有变量与常量,是没有自变量的.
再问: 我想解的是85+45*cos(y)+50*cos(z)=35*cos(x)和45*sin(y)+50*sin(z)=35*sin(x)这两个方程,y、z并不显含x,那具体该怎么写呢?
再答: 你要的是不是这个 [y,z]=solve('85+45*cos(y)+50*cos(z)=35*cos(x)','45*sin(y)+50*sin(z)=35*sin(x)','y,z')
再问: 出现了一个zll还有warning,这是怎么回事呢?
再答: >> [y,z]=solve('85+45*cos(y)+50*cos(z)=35*cos(x)','45*sin(y)+50*sin(z)=35*sin(x)','y,z') y = atan(-5/9/(11328800*sin(x)^2+11520000)*(633080*sin(x)*cos(x)+8963080*sin(x)+7930160*sin(x)^3+40*(250493929*sin(x)^2*cos(x)^2+326963762160*sin(x)^2*cos(x)+131125592108*sin(x)^4*cos(x)-7762182169*sin(x)^2+14285786732*sin(x)^4+39304648516*sin(x)^6+196169500800*cos(x)+18149500800)^(1/2))+7/9*sin(x),1/18*(-3757-1190*sin(x)/(11328800*sin(x)^2+11520000)*(633080*sin(x)*cos(x)+8963080*sin(x)+7930160*sin(x)^3+40*(250493929*sin(x)^2*cos(x)^2+326963762160*sin(x)^2*cos(x)+131125592108*sin(x)^4*cos(x)-7762182169*sin(x)^2+14285786732*sin(x)^4+39304648516*sin(x)^6+196169500800*cos(x)+18149500800)^(1/2))-490*sin(x)/(11328800*sin(x)^2+11520000)*(633080*sin(x)*cos(x)+8963080*sin(x)+7930160*sin(x)^3+40*(250493929*sin(x)^2*cos(x)^2+326963762160*sin(x)^2*cos(x)+131125592108*sin(x)^4*cos(x)-7762182169*sin(x)^2+14285786732*sin(x)^4+39304648516*sin(x)^6+196169500800*cos(x)+18149500800)^(1/2))*cos(x)+1813*cos(x)+686*sin(x)^2*cos(x))/(49*sin(x)^2+240)) atan(-5/9/(11328800*sin(x)^2+11520000)*(633080*sin(x)*cos(x)+8963080*sin(x)+7930160*sin(x)^3-40*(250493929*sin(x)^2*cos(x)^2+326963762160*sin(x)^2*cos(x)+131125592108*sin(x)^4*cos(x)-7762182169*sin(x)^2+14285786732*sin(x)^4+39304648516*sin(x)^6+196169500800*cos(x)+18149500800)^(1/2))+7/9*sin(x),1/18*(-3757-1190*sin(x)/(11328800*sin(x)^2+11520000)*(633080*sin(x)*cos(x)+8963080*sin(x)+7930160*sin(x)^3-40*(250493929*sin(x)^2*cos(x)^2+326963762160*sin(x)^2*cos(x)+131125592108*sin(x)^4*cos(x)-7762182169*sin(x)^2+14285786732*sin(x)^4+39304648516*sin(x)^6+196169500800*cos(x)+18149500800)^(1/2))-490*sin(x)/(11328800*sin(x)^2+11520000)*(633080*sin(x)*cos(x)+8963080*sin(x)+7930160*sin(x)^3-40*(250493929*sin(x)^2*cos(x)^2+326963762160*sin(x)^2*cos(x)+131125592108*sin(x)^4*cos(x)-7762182169*sin(x)^2+14285786732*sin(x)^4+39304648516*sin(x)^6+196169500800*cos(x)+18149500800)^(1/2))*cos(x)+1813*cos(x)+686*sin(x)^2*cos(x))/(49*sin(x)^2+240))
再问: 那请问你安装的matlab版本是2011b么?会不会是我的版本的问题?
再答: 我的是matlab 7 ,这个应该不会吧