error with the integral of a imaginary array

g=@(xk) exp(-xk.^2).*sqrt(xk-beta.*exp(1i*pi()/4));
L=integral(g,-Inf,Inf);
beta =
0.00000000000000 + 0.00000000000000i -42653.4724963762 + 7689.41984929493i -60321.1192866830 + 10874.4818376538i -73877.9814829653 + 13318.4658597074i -85306.9449927524 + 15378.8396985899i -95376.0639783148 + 17194.0654905596i -104479.243373958 + 18835.1550488013i -112850.480778745 + 20344.2926475981i -120642.238573366 + 21748.9636753075i -127960.417489129 + 23068.2595478848i -134882.123203897 + 24316.0806090807i
this are the errors that the matlab gives me
Arrays have incompatible sizes for this operation.
Error in untitled5 (line 342)
g=@(xk) exp(-xk.^2).*sqrt(xk-beta.*exp(1i*pi()/4));
fx = FUN(t);
[q,errbnd] = iterateScalarValued(u,tinterval,pathlen);
[q,errbnd] = vadapt(@minusInfToInfInvTransform,interval);
Error in integral (line 87)
Q = integralCalc(fun,a,b,opstruct);

Answers (1)

Products

Release

R2022a

Asked:

on 4 Apr 2022

Answered:

on 4 Apr 2022

Community Treasure Hunt

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

Start Hunting!