如程序所见,错误使用 symengine Unable to convert expression into double array.希望有大佬能帮忙解决。最后一行sym转double错误。
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
clear;clc
syms y
gt = 4.2374;
atm = 2;
utm = 2;
A0t = 0.0620;
hlt = 0.1219;
hfm = 0.8660;
xishut = utm/(A0t*hlt*hfm)^atm;
k1 = 1 - gt^2/atm;
k2 = (atm*utm - gt^2)/atm;
k3 = -gt^2/atm;
ft = y^(gt^2/2)* meijerG([k1], [1], [0, k2], [k3], xishut*y^(atm/2));
gf = 4.5749;
afm = 4.4948;
bfm = 2.5442;
A0f = 0.3900;
hlf = 0.8603;
xishuf = ((afm*bfm)/(4*A0f*hlf))^2;
k4 = (gf^2 + 1)/2;
k5 = (gf^2 + 2)/2;
k6 = (gf^2)/2;
k7 = (gf^2 + 1)/2;
k8 = (afm)/2;
k9 = (afm + 1)/2;
k10 = (bfm)/2;
k11 = (bfm + 1)/2;
ff = meijerG([1], [k4, k5], [k6, k7, k8, k9, k10, k11], [0], xishuf*y);
fx = (1 - exp(-y))^(1 - 1)*(exp(-y))^(3 - 1 + 1);
f=ft.*ff.*fx
j2=int(f,y,-10.6855,50)
j2=abs(double(j2))
0 commentaires
Réponse acceptée
yooizeng
le 18 Mai 2023
仅供参考,估计积分区间存在奇异点
clear;clc
syms y
gt = 4.2374;
atm = 2;
utm = 2;
A0t = 0.0620;
hlt = 0.1219;
hfm = 0.8660;
xishut = utm/(A0t*hlt*hfm)^atm;
k1 = 1 - gt^2/atm;
k2 = (atm*utm - gt^2)/atm;
k3 = -gt^2/atm;
ft = y^(gt^2/2)* meijerG([k1], [1], [0, k2], [k3], xishut*y^(atm/2));
gf = 4.5749;
afm = 4.4948;
bfm = 2.5442;
A0f = 0.3900;
hlf = 0.8603;
xishuf = ((afm*bfm)/(4*A0f*hlf))^2;
k4 = (gf^2 + 1)/2;
k5 = (gf^2 + 2)/2;
k6 = (gf^2)/2;
k7 = (gf^2 + 1)/2;
k8 = (afm)/2;
k9 = (afm + 1)/2;
k10 = (bfm)/2;
k11 = (bfm + 1)/2;
ff = meijerG([1], [k4, k5], [k6, k7, k8, k9, k10, k11], [0], xishuf*y);
fx = (1 - exp(-y))^(1 - 1)*(exp(-y))^(3 - 1 + 1);
f=ft.*ff.*fx;
fun=matlabFunction(f);
j2=integral(fun,-10.6855,50)
j2=abs(double(j2))
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Simulation, Tuning, and Visualization dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!