matlab解方程与积分
y已知,x未知a=(2/(sqrt(2*pi)*x))*exp(-y^2/(2*x^2))b=y*a从0到正无穷的积分求解方程为b=2*x/sqrt(2*pi)最好解得x...
y已知,x未知
a=(2/(sqrt(2*pi)*x))*exp(-y^2/(2*x^2))
b=y*a从0到正无穷的积分
求解方程为b=2*x/sqrt(2*pi)
最好解得x=?的程序怎样编写? 展开
a=(2/(sqrt(2*pi)*x))*exp(-y^2/(2*x^2))
b=y*a从0到正无穷的积分
求解方程为b=2*x/sqrt(2*pi)
最好解得x=?的程序怎样编写? 展开
2个回答
2013-07-15
展开全部
那就用数值解法吧。
function hahaha
[t,N] = ODE23t(@myfun,[0 1000],[100 100])
plot(t,N)
function dN=myfun(t,N)
r1=0.01,r2=0.05,K1=1000,K2=1000,m=9e-6,n=4e-5;
dN1=(r1*(1-N(1)/K1)-m*N(2))*N(1);
dN2=(r2*(1-N(2)/K2)-n*N(1))*N(2);
dN=[dN1;dN2]
运行结果:
t =
1.0e+003 *
0
0.0008
0.0025
0.0041
0.0062
0.0119
0.0175
0.0262
0.0334
0.0407
0.0479
0.0552
0.0624
0.0697
0.0770
0.0870
0.1021
0.1127
0.1232
0.1338
0.1444
0.1575
0.1706
0.1887
0.2068
0.2344
0.2692
0.3208
0.3978
0.4978
0.5978
0.6978
0.7978
0.8978
1.0000
N =
100.0000 100.0000
100.6680 103.4749
102.0064 110.6275
103.3491 118.1925
105.0911 128.6155
109.7009 159.7873
114.2864 196.3973
121.1742 263.2676
126.6518 327.7557
131.7478 397.5742
136.3693 469.3134
140.4576 539.2183
143.9950 603.9796
147.0011 661.1861
149.5247 709.7241
152.3405 762.2560
155.5180 814.5791
157.1835 836.1262
158.5758 849.7814
159.7909 858.1832
160.8931 863.1899
162.1664 866.5297
163.3772 867.9591
164.9956 868.3339
166.5843 867.7741
168.9858 866.2555
172.0079 863.9496
176.4789 860.3995
183.1504 855.0764
191.7795 848.1936
200.3320 841.3528
208.7700 834.5915
217.0545 827.9496
225.1522 821.4475
233.2121 814.9635
function hahaha
[t,N] = ODE23t(@myfun,[0 1000],[100 100])
plot(t,N)
function dN=myfun(t,N)
r1=0.01,r2=0.05,K1=1000,K2=1000,m=9e-6,n=4e-5;
dN1=(r1*(1-N(1)/K1)-m*N(2))*N(1);
dN2=(r2*(1-N(2)/K2)-n*N(1))*N(2);
dN=[dN1;dN2]
运行结果:
t =
1.0e+003 *
0
0.0008
0.0025
0.0041
0.0062
0.0119
0.0175
0.0262
0.0334
0.0407
0.0479
0.0552
0.0624
0.0697
0.0770
0.0870
0.1021
0.1127
0.1232
0.1338
0.1444
0.1575
0.1706
0.1887
0.2068
0.2344
0.2692
0.3208
0.3978
0.4978
0.5978
0.6978
0.7978
0.8978
1.0000
N =
100.0000 100.0000
100.6680 103.4749
102.0064 110.6275
103.3491 118.1925
105.0911 128.6155
109.7009 159.7873
114.2864 196.3973
121.1742 263.2676
126.6518 327.7557
131.7478 397.5742
136.3693 469.3134
140.4576 539.2183
143.9950 603.9796
147.0011 661.1861
149.5247 709.7241
152.3405 762.2560
155.5180 814.5791
157.1835 836.1262
158.5758 849.7814
159.7909 858.1832
160.8931 863.1899
162.1664 866.5297
163.3772 867.9591
164.9956 868.3339
166.5843 867.7741
168.9858 866.2555
172.0079 863.9496
176.4789 860.3995
183.1504 855.0764
191.7795 848.1936
200.3320 841.3528
208.7700 834.5915
217.0545 827.9496
225.1522 821.4475
233.2121 814.9635
东莞大凡
2024-11-14 广告
2024-11-14 广告
标定板认准大凡光学科技,专业生产研发厂家,专业从事光学影像测量仪,光学投影测量仪.光学三维测量仪,光学二维测量仪,光学二维测量仪,光学三维测量仪,光学二维测量仪.的研发生产销售。东莞市大凡光学科技有限公司创立于 2018 年,公司总部坐落于...
点击进入详情页
本回答由东莞大凡提供
2013-07-15
展开全部
这个你看下符号运算的部分就行了,用MATLAB解你这个方程不难,就三个语句,如下:
a='2/(sqrt(2*pi)*x))*exp(-y^2/(2*x^2))';
b='y*int(a,''x'',0,+inf)';
solve('b=2*x/sqrt(2*pi)','x')
运行结果如下,也就是解方程的结果:
ans =
1/2*b*pi^(1/2)*2^(1/2)
a='2/(sqrt(2*pi)*x))*exp(-y^2/(2*x^2))';
b='y*int(a,''x'',0,+inf)';
solve('b=2*x/sqrt(2*pi)','x')
运行结果如下,也就是解方程的结果:
ans =
1/2*b*pi^(1/2)*2^(1/2)
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询