Question: 5. An approximation for a factorial can be found using Stirling' s formula: Write a function to implement this, passing the value of n as
5. An approximation for a factorial can be found using Stirling' s formula: Write a function to implement this, passing the value of n as an input argument. (hints: in calculation, for e use exp (1)) Test your function from the command prompt to calculate the factorial of 3. You will get 5.8362, that is an approximation with this formula. Now modify your formula in your function so that you get an integer value of the factorials. (hints:use round or ceil function) Use MATLAB help command to find out how to use these built-in commands. Type help at the prompt in the command window followed by function name and it will give you the details with examples on how to use it. Example >> help ceil
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
