I want to plot y vs. B
1 次查看(过去 30 天)
显示 更早的评论
采纳的回答
Torsten
2023-3-4
移动:Torsten
2023-3-4
B >= 1 ?
B = 1:0.1:10;
y = arrayfun(@(B) 2/sqrt(pi)*integral(@(x)x.^0.5./(B*exp(x)-1),0,Inf),B);
plot(B,y)
grid on
3 个评论
Star Strider
2023-3-4
Since ‘B’ is not an integration limit, this would also work —
B = 1:0.1:10;
y = 2/sqrt(pi)*integral(@(x)x.^0.5./(B*exp(x)-1),0,Inf, 'ArrayValued',1)
Otherwise the arrayfun call would be required.
.
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!