help to solve the eqaution with a factorial and exponential factors???
1 view (last 30 days)
Show older comments
Mrunmayee sahoo
on 16 Jul 2014
Commented: Star Strider
on 17 Jul 2014
the eqaution is
{(n-1)/ (n-1)!}.exp [-(n-1)].(n-1)^(n-1)=0.38
please help to find the value of n?????
0 Comments
Accepted Answer
Star Strider
on 16 Jul 2014
If you plot it:
Eqn = @(n) (n-1)./factorial(n-1).*exp(-(n-1)).*(n-1).^(n-1)-0.38;
n = 1:5;
y = Eqn(n);
figure(1)
plot(n, Eqn(n))
grid
you can see that the equation is satisfied as closely as it can be at n = 2.
I set it up the way I did initially to use it with the fzero function, so it will produce a zero-crossing. Replacing factorial(n-1) with gamma(n) and letting fzero solve it produces n = 2.058.
2 Comments
More Answers (0)
See Also
Categories
Find more on Error Functions 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!