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!