how can i solve equation with summation
Show older comments
i can't solve the attached img equation on matlab for : Pfa=10^(-6),M=8,i=s=1
(later i would change these variables)

i tried the following but errors rises
if true
M=8;
s=1;
i=s;
syms pfal M i s
eqn = symsum((nchoosek(M,i)*(pfal)^(i)*(1-pfal)^(M-i)), i, s, M)==8*10^(-6);
solve(eqn,pfal)
end
Accepted Answer
More Answers (1)
Roger Stafford
on 30 May 2017
If I interpret your code correctly, you are doing things the hard way. Your expression for Pfa is simply the binomial expansion of ((Pfa1+(1-Pfa1))^M without the first term where i is equal to zero. Hence, you are trying to solve
(Pfa1 + (1-Pfa1))^8 = 1 = 10^(-6) + (1-Pfa1)^8
whose solution is easily found as
Pfa1 = 1 - 0.999999^(1/8)
Probably the cause of your error message is the reference to the numeric function ‘nchoosek’.
Categories
Find more on Common Operations 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!