How to obtain numerical value during integration

1 view (last 30 days)
Hi, I have a slight problem here, I am doing integration based on series of input picked from an array. Have used the following code and have got an output. However, the output am getting is not in numerical form, what can i do to get numerical values? Have pasted part of my code ad the results. I just want to know what I can do to get numerical resulsts as 10, 12 and so forth (numbers picked randomly just for explanation). Please find the attachment below; I need the Power_density_monthly to be array of values, kindy help.
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 10]);
if n==c
display(Power_density_monthly)
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 10])
end
end
%the reuslts i got aare as follows
Power_density_monthly =
int((588683273498799241*x^3*exp(-((1125899906842624*x)/1214356027258251)^(1054706091853107/562949953421312))*((1125899906842624*x)/1214356027258251)^(491756138431795/562949953421312))/281474976710656000, x, 0, 10)
int((1136847329389978479*x^3*exp(-((562949953421312*x)/1059881698388299)^(888859807670943/281474976710656))*((562949953421312*x)/1059881698388299)^(607384830960287/281474976710656))/562949953421312000, x, 0, 10)
int((2324591596434618903*x^3*exp(-((4503599627370496*x)/5108924510777933)^(8760923315398151/4503599627370496))*((4503599627370496*x)/5108924510777933)^(4257323688027655/4503599627370496))/1125899906842624000, x, 0, 10)
int((374417108231022927*x^3*exp(-((4503599627370496*x)/5360205970664107)^(231329446538139/140737488355328))*((4503599627370496*x)/5360205970664107)^(90591958182811/140737488355328))/225179981368524800, x, 0, 10)
int((972383524037662051*x^3*exp(-((4503599627370496*x)/6882223601054367)^(154273069918933/70368744177664))*((4503599627370496*x)/6882223601054367)^(83904325741269/70368744177664))/562949953421312000, x, 0, 10)
int((304346401206112139*x^3*exp(-((140737488355328*x)/286487278512009)^(643201787191211/281474976710656))*((140737488355328*x)/286487278512009)^(361726810480555/281474976710656))/225179981368524800, x, 0, 10)
int((287711040109225411*x^3*exp(-((140737488355328*x)/420488410245951)^(7139606461783553/2251799813685248))*((140737488355328*x)/420488410245951)^(4887806648098305/2251799813685248))/225179981368524800, x, 0, 10)
int((2140903232335760319*x^3*exp(-((2251799813685248*x)/4266926036145285)^(6738851442847649/2251799813685248))*((2251799813685248*x)/4266926036145285)^(4487051629162401/2251799813685248))/1125899906842624000, x, 0, 10)
int((436526358616317991*x^3*exp(-((1125899906842624*x)/2709338596340557)^(3489855762716625/1125899906842624))*((1125899906842624*x)/2709338596340557)^(2363955855874001/1125899906842624))/281474976710656000, x, 0, 10)
int((2236234975767258893*x^3*exp(-((2251799813685248*x)/3933457441055675)^(6488818419739043/2251799813685248))*((2251799813685248*x)/3933457441055675)^(4237018606053795/2251799813685248))/1125899906842624000, x, 0, 10)
int((159206995598753823*x^3*exp(-((1125899906842624*x)/1816334693374449)^(6826242830561875/2251799813685248))*((1125899906842624*x)/1816334693374449)^(4574443016876627/2251799813685248))/70368744177664000, x, 0, 10)
int((424189302194492611*x^3*exp(-((4503599627370496*x)/6586604795853987)^(1288175588800873/562949953421312))*((4503599627370496*x)/6586604795853987)^(725225635379561/562949953421312))/225179981368524800, x, 0, 10)
  1 Comment
Dyuman Joshi
Dyuman Joshi on 28 Feb 2023
If the input data is numerical, use integral (use element-wise operations whereever required)

Sign in to comment.

Answers (0)

Products


Release

R2018a

Community Treasure Hunt

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

Start Hunting!