Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions