symsum with multiple summation
2 次查看(过去 30 天)
显示 更早的评论
To produce and solve following equation
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/188461/image.png)
I have written following equations
syms a d d1 k Nt PSI p Pi1 i
A=symsum( nchoosek(d,k) * PSI ( (1-PSI)^(d-k) ) nchoosek(k,a) (p^a)(1-p)^(k-a),d,0,Nt);
B=symsum ( (nchoosek(i,d1) * nchoosek(Nt-i,d-d1) (Pi1^d) (1-Pi1)^(Nt-d) ) * A ,i,0,Nt );
C=symsum( B, a,0,d);
M=symsum( C, d1,0,i )
where limits of summation for variables are as follows
Nt = 10 constant
d from 0 to Nt
d1 (d bar) from 0 to min(i,d), min gives error in symsum Error using symengine Input arguments must be convertible to floating-point numbers.
a from 0 to d
i from 0 to Nt
without using min() for limit of d1 script runs fine but can any one tell me that implementation i have done for multiple summation and their limits fine or limits or summation should follow any order also how can i add min(i,d) for d1 limit.
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Calculus 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!