2 commentaires

reem123
reem123 le 4 Mar 2023
yes
reem123
reem123 le 4 Mar 2023
B > =1

Connectez-vous pour commenter.

 Réponse acceptée

Torsten
Torsten le 4 Mar 2023
Déplacé(e) : Torsten le 4 Mar 2023

0 votes

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 commentaires

reem123
reem123 le 4 Mar 2023
Thank you very much
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)
y = 1×91
2.6124 1.6562 1.3616 1.1727 1.0359 0.9304 0.8460 0.7764 0.7180 0.6680 0.6248 0.5870 0.5537 0.5240 0.4974 0.4734 0.4517 0.4319 0.4138 0.3971 0.3818 0.3676 0.3544 0.3422 0.3308 0.3201 0.3101 0.3007 0.2919 0.2836
Otherwise the arrayfun call would be required.
.
reem123
reem123 le 6 Mar 2023
Thank you

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur MATLAB dans Centre d'aide et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by