numerical integration of array
6 views (last 30 days)
Show older comments
I'm trying to integrate the following series to compute the expected value
$F_Z(z)=\sum_{i=0}^n \frac{n!}{i!(n-i)! (\lambda-n*\mu)} (-\epsilon)^{i} (1-e^{-\mu z})^{n-i}*(e^{-\lambda z}-e^{-\mu*z})$
using expected value denfition
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1356698/image.png)
Throught my research and looking up the integral defition, I can use integral function in MATLAB. I tried finding the integration for a simple model by the following steps
1) define array function for ![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1356703/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1356703/image.png)
nCk = @(n,kVec,z)arrayfun(@(k)nchoosek(n,k)*exp(-lam*k*z),kVec);
integral(@(z) nCk(10,1:5),0,1,'ArrayValued',true)
However, I got the error "Not enough input arguments"
0 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Numerical Integration and Differential Equations 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!