compute a numerical double integral
Show older comments
I have this function beta defined as follows: fun1=@(x) -exp((-c.*x.*b+a.*exp(-b.*x)-a)./b); beta=@(x) (exp(-(-c.*x*b+a.*exp(-b.*x)-a)./b).*integral(fun1,0,x,'AbsTol',1.e-12)); where a,b,c are constants. I would like to define the function alpha as: alpha=@(t) integral(beta(x),0,t) in other words, alpha(t) should be the integral of the function beta over the interval [0,t]. The problem is that yet beta has been defined as an integral and the code obviously doesn't work.
1 Comment
Torsten
on 12 Apr 2017
Anything wrong with the solution under
https://de.mathworks.com/matlabcentral/answers/334870-i-have-a-function-beta-defined-as-an-integral-i-want-to-define-another-function-alpha-being-the-in
?
Best wishes
Torsten.
Answers (0)
Categories
Find more on Numerical Integration and Differentiation 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!