Plot of a numerical integration
13 ビュー (過去 30 日間)
古いコメントを表示
P Rakesh Kumar Dora
2020 年 10 月 23 日
コメント済み: Star Strider
2020 年 10 月 23 日
Please someone can help how to plot the following numerical
integration with respect to "z". Here "z" varies from "0" to "1". The
integral need to be done by numerical integration method.
0 件のコメント
採用された回答
Star Strider
2020 年 10 月 23 日
Try this:
zv = linspace(0, 1);
for k = 1:numel(zv)
z = zv(k);
u_int(k) = integral(@(u) sqrt(u)/((exp(u)/z)-1) + z/(1-z), 0, Inf, 'ArrayValued',1);
end
figure
semilogy(zv, u_int)
grid
xlabel('z')
ylabel('Integrated Value')
.
6 件のコメント
Star Strider
2020 年 10 月 23 日
The ‘z’ values are the elements of the ‘zv’ vector. They correspond to the elements of ‘u_int’. So ‘z=0’ corresponds to ‘u_int(1)’, ‘z=1’ to ‘u_int(end)’, with end depending on how many elements of ‘u_int’ you choose to calculate.
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!