error when trying to integrate this function in a plot
1 view (last 30 days)
Show older comments
so im trying to integrate this, but i mostly get errors when trying a few things:
a = logspace(-3,0,200)
fun = @(x)((exp(-H1(1)*abs(a)-H2*sqrt(a.^2+m0^2)))./(abs(a)+sqrt(a.^2+m0^2)).*(exp(j*a.*(X1(1)-Xg(1)))))
Zint = fun(x)
Zint_real = real(Zint);
Zint_imag = imag(Zint);
semilogx(a,Zint_real)
hold on
semilogx(a,Zint_imag)
hold off
integrate(fun(x))
also get this error message: Undefined function 'integrate' for input arguments of type 'double'.
what am i doing wrong?
5 Comments
Torsten
on 26 Mar 2019
Take a look at
for symbolic integration and
for numerical integration.
Answers (0)
See Also
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!