How to get numerical output

2 visualizaciones (últimos 30 días)
okoth ochola
okoth ochola el 4 de Jun. de 2023
Respondida: KALYAN ACHARJYA el 4 de Jun. de 2023
Hello, I have been facing some problems with integration, matlab is not giving me numerical output but an output of the form given below. I have also attached part of the code responsible for the output (the loop is just a part of a larger script am using, so the Monthly_parameters(2,n) is caled from elsewhere in he code, which has no problem). How can I resolve this problem to get numerical output. Please can someone assist. What am I not doing well,
for n=1:c
syms x
expr=(Monthly_parameters(1,n)/Monthly_parameters(2,n))*((x/Monthly_parameters(2,n))^(Monthly_parameters(1,n)-1))*exp(-(x/Monthly_parameters(2,n))^Monthly_parameters(1,n))*density*x^3
Power_density_monthly(n,:) = int(expr,[0 25]);
if n==c
display(Power_density_monthly)
Max_power_monthly=0.5*density.*(Wind_speed_MaxE.^3)
Max_Power_annual=0.5*density.*(Wind_speed_MaxE_annual.^3)
Mp_power_monthly=0.5*density.*(Most_probable_wind_speed.^3)
syms x
expr=(Overal_parameters(1)/Overal_parameters(2))*((x/Overal_parameters(2))^(Overal_parameters(1)-1))*exp(-(x/Overal_parameters(2))^Overal_parameters(1))*density*x^3
Mp_power_Overall=int(expr,[0 25])
end
end
Power_density_monthly =
int((780035855555123397*x^3*exp(-((4503599627370496*x)/7214917075124989)^(4843579468129569/1125899906842624))*((4503599627370496*x)/7214917075124989)^(3717679561286945/1125899906842624))/225179981368524800, x, 0, 25)
int((876700907771204457*x^3*exp(-((2251799813685248*x)/3500040294331183)^(330107227435517/70368744177664))*((2251799813685248*x)/3500040294331183)^(259738483257853/70368744177664))/225179981368524800, x, 0, 25)
int((1011422054596262133*x^3*exp(-((4503599627370496*x)/6407789261932345)^(5577777155503949/1125899906842624))*((4503599627370496*x)/6407789261932345)^(4451877248661325/1125899906842624))/225179981368524800, x, 0, 25)
int((963101305032312717*x^3*exp(-((140737488355328*x)/203114773723167)^(1346864763691579/281474976710656))*((140737488355328*x)/203114773723167)^(1065389786980923/281474976710656))/225179981368524800, x, 0, 25)
int((899082092550608151*x^3*exp(-((281474976710656*x)/432556907928793)^(669411416785461/140737488355328))*((281474976710656*x)/432556907928793)^(528673928430133/140737488355328))/225179981368524800, x, 0, 25)
int((787803615475959759*x^3*exp(-((4503599627370496*x)/7016859725054415)^(4757527240969181/1125899906842624))*((4503599627370496*x)/7016859725054415)^(3631627334126557/1125899906842624))/225179981368524800, x, 0, 25)
int((388299016464805677*x^3*exp(-((4503599627370496*x)/7550763379329251)^(1261675515893479/281474976710656))*((4503599627370496*x)/7550763379329251)^(980200539182823/281474976710656))/112589990684262400, x, 0, 25)
int((109902315657116823*x^3*exp(-((4503599627370496*x)/7141945877977533)^(2702115500474055/562949953421312))*((4503599627370496*x)/7141945877977533)^(2139165547052743/562949953421312))/28147497671065600, x, 0, 25)
int((932214374257080879*x^3*exp(-((4503599627370496*x)/7077114042901685)^(5677962354422989/1125899906842624))*((4503599627370496*x)/7077114042901685)^(4552062447580365/1125899906842624))/225179981368524800, x, 0, 25)
int((30733691381488647*x^3*exp(-((4503599627370496*x)/7193181261676949)^(3044221384155719/562949953421312))*((4503599627370496*x)/7193181261676949)^(2481271430734407/562949953421312))/7036874417766400, x, 0, 25)
int((971959284150080301*x^3*exp(-((2251799813685248*x)/3251016897941623)^(2719492208413129/562949953421312))*((2251799813685248*x)/3251016897941623)^(2156542254991817/562949953421312))/225179981368524800, x, 0, 25)
int((900166504076381007*x^3*exp(-((4503599627370496*x)/6159683216945655)^(1193003600218407/281474976710656))*((4503599627370496*x)/6159683216945655)^(911528623507751/281474976710656))/225179981368524800, x, 0, 25)
>>

Respuesta aceptada

KALYAN ACHARJYA
KALYAN ACHARJYA el 4 de Jun. de 2023
You can use vpa
https://in.mathworks.com/help/symbolic/vpa.html

Más respuestas (0)

Categorías

Más información sobre Programming en Help Center y File Exchange.

Productos


Versión

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by