Multiple anonymous functions, result NaN
Mostrar comentarios más antiguos
Z = @(t)(integral(@(X)((X.*(-1.94259876933865e-3)+X.^2.*9.43561288366922e-4+X.^3.*3.22493262073758e-6-X.^4.*3.33598332709698e ...
-7-X.^5.*1.316395160738724e-9+X.^6.*3.58619198487258e-11+X.^7.*2.98983988537052e-13-X.^8.*2.17709553882494e ...
-15-X.^9.*2.18502610124372e-17+X.^10.*6.47767646373618e-20+X.^11.*6.76115455690154e-22-X.^12.*7.44347608685098e ...
-25-X.^13.*7.726801093703259e-27+5.07072734540628e1)* % here ends the polynomial
* ((-295.9471041.*integral(@(x)((x.*(-1.15517395637196e-2)+x.^2.*5.25774286994568e-4-x.^3.*1.089934292266744e-5
-x.^4.*1.230239476736945e-7+x.^5.*6.42213403953954e-10 ...
+x.^6.*1.550438107746178e-11+x.^7.*3.670339539265712e-15-x.^8.*1.053763407268398e-15-x.^9.*1.00711819287645e-18 ...
+x.^10.*3.225336064282519e-20+x.^11.*1.85216906506446e-23-x.^12.*3.481067131642152e-25+2.92686659979064e-2)./(X-x)), ...
-180,180,'ArrayValued',1)-295.9471041.*integral(@(x)(-((X-t*1.028888e1+x).*(x.*(-1.15517395637196e-2) ...
+x.^2.*5.25774286994568e-4-x.^3.*1.089934292266744e-5-x.^4.*1.230239476736945e-7+x.^5.*6.42213403953954e-10 ...
+x.^6.*1.550438107746178e-11+x.^7.*3.670339539265712e-15-x.^8.*1.053763407268398e-15-x.^9.*1.00711819287645e-18 ...
+x.^10.*3.225336064282519e-20+x.^11.*1.85216906506446e-23-x.^12.*3.481067131642152e-25+2.92686659979064e-2))./((X-t*1.028888e1+x).^2 ...
+1.018379983e5)),-180,180,'ArrayValued',1)))), -180, 180, 'ArrayValued', 1))
When I pass any argument to Z() I receive
Warning: Infinite or Not-a-Number value encountered.
> In integralCalc/iterateArrayValued (line 267)
In integralCalc/vadapt (line 130)
In integralCalc (line 75)
In integral (line 88)
To make it look clearer
Z = @(t)(integral(@(X)[B(X)*p(X,t)], -180, 180, 'ArrayValued', 1))
%B(x) is a polynomial of 13th grade and p(X,t) is
p(X,t) = @(X)(integral(@(x)(-295...*integral(@(x)(.. ), -180, 180, 'ArrayValued', 1) -295..*integral(@(x)(..), -180, 180, 'ArrayValued', 1))
% and inside p(X) there are some t's
It doesn't plot anything. Any ideas to make it work?
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Whos en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!