Need help with this integral ? what is opstruct in integralcalc?

10 views (last 30 days)
fun=@(t)(t.*N);
q= integral(fun,0,500);
fun_2=@(t)(1.*N);
s= integral(fun_2,0,500);
tau= q./s;
plot(tau,f,'linewidth', 1.5)
error
Error in integral (line 88)
Q = integralCalc(fun,a,b,opstruct);
Error in Lifetimeof_plasmon (line 66)
s= integral(fun_2,0,500);

Answers (1)

David Goodmanson
David Goodmanson on 19 Feb 2021
Hello HA
I assume N is defined further on up since Matlab was not complaining about that. Try
fun_2=@(t)(ones(size(t))*N);
and see what happens

Community Treasure Hunt

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

Start Hunting!