matlab 解一元非线性方程 参数传递疑问 15
在对一组信号做处理时,需要把之前解得的方差、均值等结果,赋值到一个非线性方程中求解,方程如下:log(x/a)-(b/a)^2/(c/d)^2*log(x/d)=0其中,...
在对一组信号做处理时,需要把之前解得的方差、均值等结果,赋值到一个非线性方程中求解,方程如下:
log(x/a)-(b/a)^2/(c/d)^2*log(x/d)=0
其中,a、b、c、d为之前处理得到的方差与平均值,x为未知量
我的问题是,如何实现MATLAB中动态的参数传递?用什么函数能解决呢?
现在我的做法是把a、b、c、d的值复制黏贴到solve中求解,这么做太笨了。。。
望赐教,不盛感激 展开
log(x/a)-(b/a)^2/(c/d)^2*log(x/d)=0
其中,a、b、c、d为之前处理得到的方差与平均值,x为未知量
我的问题是,如何实现MATLAB中动态的参数传递?用什么函数能解决呢?
现在我的做法是把a、b、c、d的值复制黏贴到solve中求解,这么做太笨了。。。
望赐教,不盛感激 展开
2个回答
展开全部
代码是这样的:
[a,b,c,d]=solve('(a+300)*(a+300)+b*b=242500','(c-300)*(c-300)+d*d=242500','(a-c)*(a-c)+(b-d)*(b-d)=1000000','(b-d)/(a-c)=0.140540834')
结果有四组:
1,a,b,c,d=
-645.1911329 351.2023374 345.0769359 490.3754376
2,
-345.0769359 -490.3754376 645.1911329 -351.2023374
3,
495.13403441871544929862197087467+54.764098493321742310644330274791*i
69.586550138990974453113046837450-625.76458366341173499493975505703*i
-495.13403441871544929862197087467+54.764098493321742310644330274791*i
-69.586550138990974453113046837450-625.76458366341173499493975505703*i
4,
495.13403441871544929862197087467-54.764098493321742310644330274791*i
69.586550138990974453113046837450+625.76458366341173499493975505703*i
-495.13403441871544929862197087467-54.764098493321742310644330274791*i
-69.586550138990974453113046837450+625.76458366341173499493975505703*i
[a,b,c,d]=solve('(a+300)*(a+300)+b*b=242500','(c-300)*(c-300)+d*d=242500','(a-c)*(a-c)+(b-d)*(b-d)=1000000','(b-d)/(a-c)=0.140540834')
结果有四组:
1,a,b,c,d=
-645.1911329 351.2023374 345.0769359 490.3754376
2,
-345.0769359 -490.3754376 645.1911329 -351.2023374
3,
495.13403441871544929862197087467+54.764098493321742310644330274791*i
69.586550138990974453113046837450-625.76458366341173499493975505703*i
-495.13403441871544929862197087467+54.764098493321742310644330274791*i
-69.586550138990974453113046837450-625.76458366341173499493975505703*i
4,
495.13403441871544929862197087467-54.764098493321742310644330274791*i
69.586550138990974453113046837450+625.76458366341173499493975505703*i
-495.13403441871544929862197087467-54.764098493321742310644330274791*i
-69.586550138990974453113046837450+625.76458366341173499493975505703*i
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询