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'

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!