如何将一个函数在其被积函数上限被定义为一个数组?
7视图(30天)
显示旧的评论
假设我有这个方程。
![](http://www.tatmou.com/matlabcentral/answers/uploaded_files/459180/image.png)
我想图
η
vs。
θ
为
。我有一个表
在给定的
η
值如
![](http://www.tatmou.com/matlabcentral/answers/uploaded_files/459185/image.png)
![](http://www.tatmou.com/matlabcentral/answers/uploaded_files/459190/image.png)
![](http://www.tatmou.com/matlabcentral/answers/uploaded_files/459195/image.png)
我试着集成使用数组,但被证明是困难的。然后我绘制的图像
,推出最适合曲线,所以我thiniking简单函数插入上述方程。但这也被证明是困难的。我怎么能完成上面的集成eqaution然后阴谋的结果?任何帮助的指导。
![](http://www.tatmou.com/matlabcentral/answers/uploaded_files/459200/image.png)
我只有这个
信谊埃塔公关
η= 0:0.1:8;
f_d = 1 * 10 ^ 5 *埃塔。^ 6 + 0.0002 *埃塔。^ 5 + 0.0012 *埃塔。^ 4 - 0.0196 *埃塔。^ 3 + 0.0345 *埃塔。^ 2 + 0.3118 *埃塔+ 0.002;
f_dd = 6 * 10 ^ 5 *埃塔。^ 6 - 0.0015 *埃塔。^ 5 + 0.0129 *埃塔。^ 4 - 0.0458 *埃塔。^ 3 + 0.0428 *埃塔。^ 2 - 0.0177 *埃塔+ 0.3332;
eta_array = [0 1 0.2 0.4 0.6 0.8 1.2 - 1.4 3.4 3.8 4.2 4.6 1.6 2.2 - 2.6 1.8 - 2 3 5 5.6 - 6.2 7 8];
f_dd_array = [0.33206 0.33199 0.33147 0.33008 0.32739 0.32301 0.31659 0.30787 0.29667 0.28293 0.26675 0.24835 0.20646 0.16136 0.11788 0.08013 0.05052 0.02948 0.01591 0.00543 - 0.00155 0.00022 - 0.00001);
intEta = int (f_dd埃塔,埃塔[0]);%分子
埃塔,intInf = int (f_dd[0正]);% denomenator
θ= 1 - intEta / intInf;
0评论
答案(2)
艾伦·史蒂文斯
2020年12月13日
你可以试试以下
eta_array 1 = [0 0.2 0.4 0.6 0.8 1.2 1.4 1.6 3.4 3.8 4.2 2.2 - 2.6 1.8 - 2 3…
5.6 - 6.2 4.6 - 5 7 8];
f_dd_array = [0.33206 0.33199 0.33147 0.33008 0.32739 0.32301 0.31659 0.30787…
0.29667 0.28293 0.26675 0.24835 0.20646 0.16136 0.11788 0.08013 0.05052…
0.02948 0.01591 0.00543 0.00155 0.00022 - 0.00001);
公关= 30;
穴= trapz (eta_array f_dd_array。^ Pr);%分母
disp(穴)
num = 0(1,元素个数(eta_array));
为我= 2:元素个数(eta_array)
num (i) = trapz (eta_array(1:我),f_dd_array(1:我)。^ Pr);
结束
θ= 1 - num /穴;
情节(eta_arrayθ,“o”)、网格
包含(“\埃塔”),ylabel ([的公关\θ= 'num2str(公关)])
这工作得相当不错的Pr值30,但提高f值1000条结果的数组的力量本质上是零!
2的评论
艾伦·史蒂文斯
2020年12月13日
是这样的:
eta_array 1 = [0 0.2 0.4 0.6 0.8 1.2 1.4 1.6 3.4 3.8 4.2 2.2 - 2.6 1.8 - 2 3…
5.6 - 6.2 4.6 - 5 7 8];
f_dd_array = [0.33206 0.33199 0.33147 0.33008 0.32739 0.32301 0.31659 0.30787…
0.29667 0.28293 0.26675 0.24835 0.20646 0.16136 0.11788 0.08013 0.05052…
0.02948 0.01591 0.00543 0.00155 0.00022 - 0.00001);
公关= [0.5,1、10、20、30);
为j = 1:元素个数(Pr)
穴= trapz (eta_array f_dd_array。^公关(j));%分母
% disp(穴)
num = 0(1,元素个数(eta_array));
为我= 2:元素个数(eta_array)
num (i) = trapz (eta_array(1:我),f_dd_array(1:我)。^公关(j));
结束
θ(j) = 1 - num /穴;
结束
情节(eta_arrayθ,“o”)、网格
包含(“\埃塔”),ylabel ([‘\θ])