why does it take forever to solve a function
Show older comments
im trying to compute value of "pd" for various values of "lnd"..... but it takes too much time without any results and when i terminate i get this message :
Operation terminated by user during sym/symsum (line 65)
In Untitled5 (line 12)
pd=(symsum(nchoosek(M,i)*(pd1)^(i)*(1-pd1)^(M-i), i, s, M));
equations i'm trying to implement are attached

M=8;
N=32;
K=14;
c=2;
s=1;
T=18.623390280430364437245197384232;
lnd=30*rand;
pd1=2*K*nchoosek(N/2,K)*((gamma(K+i)*gamma(N-K+i+1+T/(1+lnd)))/(gamma(N+1+T/(1+lnd)))-...
(symsum(nchoosek(N/2,i)*(gamma(K+i)*gamma(N-K-i+1+T/(1+lnd)))/(gamma(N+1+T/(1+lnd))), i, K, (N/2))));
pd=(symsum(nchoosek(M,i)*(pd1)^(i)*(1-pd1)^(M-i), i, s, M));
plot(lnd,pd,'b.')
Accepted Answer
More Answers (0)
Categories
Find more on Calculus 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!