Question: 1. Write a Matlab function factfun to calculate the factorial of a number. The function should accept an integer N as the argument, and return

 1. Write a Matlab function factfun to calculate the factorial of

1. Write a Matlab function factfun to calculate the factorial of a number. The function should accept an integer N as the argument, and return its factorial calculated as N! = 1 x 2 x 3 x...N. The function should be called as factfun(N). 2. (a) Explain the difference between discrete and continuous representations of functions. (b) An object is moving with a velocity V(t) that is a function of time, and given by Vt) = t. Produce a discrete representation of this relationship for the time windowt: 0 1, with a step size of 0.1 seconds 3. (a)Explain the following terms: Truncation error, leading order error term, roundoff error. (b) Use your calculator to compute the absolute and percentage relative errors between it and each of the following approximations: 22/7, 3.1416. 4. Compute the integral, Vx dx, using the Simpson's 1/3d rule using N 6 equally spaced segments. Use your calculator to compute the values. 5. The velocity u (m/s) of air flowing past a flat surface is measured at several distances y (m) away from the surface. Use Newton's viscosity law to determine the shear stress t (N/m') at the surface -0), using the relationship T = ***where the dynamic viscosity is -1.8x10 N-s/m.Compute the derivative to second-order accuracy using the following data: y (m) 0 0.004 0.008 0.012 0.016 0.02 0.024 4.299 3.465 1.915 2.6703 1.2377 0.593 u (m/s) 10

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!