 7.1: Write a userdefined MATLAB function for the following math functio...
 7.2: Write a userdefined MATLAB function for the following math functio...
 7.3: The fuel consumption of an airplane is measured in gal/mi (gallon p...
 7.4: Tables of materials properties list density, in units of kg/m3, whe...
 7.5: Write a userdefined MATLAB function that converts speed given in u...
 7.6: The body surface area (BSA) in m2 of a person (used for determining...
 7.7: The fuel tank shown in the figure in shaped as a frustumof cone wit...
 7.8: The surface area S of a ring in shape of a torus with aninner radiu...
 7.9: The windchill temperature T we is the perceived air temperature fel...
 7.10: Write a userdefmed function that calculates grade point average (G...
 7.11: The factorial n! of a positive number (integer) is defmed byn! = n(...
 7.12: Write a userdefmed MATLAB function that determinesthe angle that f...
 7.13: Write a userdefined MATLAB function that determines the unit vecto...
 7.14: Write a userdefined MATLAB function that determines the cross prod...
 7.15: The area of a triangle ABC can be calculated by:A= !IABxACI2where A...
 7.16: Write a userdefined MATLAB function that determines the circumfere...
 7.17: Write a userdefmed function that plots a circle given the coordina...
 7.18: Write a userdefined MATLAB function that converts integers written...
 7.19: Write a userdefmed function that plots a triangle and the circle t...
 7.20: Write a userdefined function that plots an ellipse ywith axes that...
 7.21: In polar coordinates a twodimensional vector is ygiven by its radi...
 7.22: Write a userdefmed function that fmds all the prime numbers betwee...
 7.23: The geometric mean GM of a set of n positive numbers x1, x2, ... , ...
 7.24: Write a userdefined function that determines the polar ycoordinate...
 7.25: Write a userdefined function that determines the mode of a set of ...
 7.26: Write a userdefined function that sorts the elements of a vector f...
 7.27: Write a userdefined function that sorts the elements of a matrix. ...
 7.28: Write a userdefmed function that fmds the largest element of a mat...
 7.29: Write a userdefmed MATLAB function that calculates the determinant...
 7.30: A twodimensional state of stress at a point in a loadedmaterial in...
 7.31: The dew point temperature Ta and the relative humidity RH can be ca...
 7.32: In a lottery the player has to select several numbers out of a list...
 7.33: The Taylor's series expansion for cosx about x = 0 is given by: x2 ...
 7.34: Write a userdefmed function that determines the1r' ....
 7.35: The area moment of inertia Io of a rectangle about theaxis X0 passi...
 7.36: In a lowpass RL filter (a filter that passes signalswith low frequ...
 7.37: A circuit that filters out a certain frequencyis shown in the figur...
 7.38: The first derivative d) of a function f(x) at a point x = x0 can be...
 7.39: The new coordinates (X,, Y,) of a point in the xy plane that is ro...
 7.40: In lottery the player has to guess correctly r numbers that are dra...
Solutions for Chapter 7: UserDefined Functions and Function Files
Full solutions for MATLAB: An Introduction with Applications  5th Edition
ISBN: 9781118629864
Solutions for Chapter 7: UserDefined Functions and Function Files
Get Full SolutionsSince 40 problems in chapter 7: UserDefined Functions and Function Files have been answered, more than 4868 students have viewed full stepbystep solutions from this chapter. MATLAB: An Introduction with Applications was written by and is associated to the ISBN: 9781118629864. Chapter 7: UserDefined Functions and Function Files includes 40 full stepbystep solutions. This textbook survival guide was created for the textbook: MATLAB: An Introduction with Applications, edition: 5. This expansive textbook survival guide covers the following chapters and their solutions.

Companion matrix.
Put CI, ... ,Cn in row n and put n  1 ones just above the main diagonal. Then det(A  AI) = ±(CI + c2A + C3A 2 + .•. + cnA nl  An).

Complete solution x = x p + Xn to Ax = b.
(Particular x p) + (x n in nullspace).

Condition number
cond(A) = c(A) = IIAIlIIAIII = amaxlamin. In Ax = b, the relative change Ilox III Ilx II is less than cond(A) times the relative change Ilob III lib II· Condition numbers measure the sensitivity of the output to change in the input.

Dot product = Inner product x T y = XI Y 1 + ... + Xn Yn.
Complex dot product is x T Y . Perpendicular vectors have x T y = O. (AB)ij = (row i of A)T(column j of B).

Ellipse (or ellipsoid) x T Ax = 1.
A must be positive definite; the axes of the ellipse are eigenvectors of A, with lengths 1/.JI. (For IIx II = 1 the vectors y = Ax lie on the ellipse IIA1 yll2 = Y T(AAT)1 Y = 1 displayed by eigshow; axis lengths ad

GaussJordan method.
Invert A by row operations on [A I] to reach [I AI].

GramSchmidt orthogonalization A = QR.
Independent columns in A, orthonormal columns in Q. Each column q j of Q is a combination of the first j columns of A (and conversely, so R is upper triangular). Convention: diag(R) > o.

Kronecker product (tensor product) A ® B.
Blocks aij B, eigenvalues Ap(A)Aq(B).

Nullspace N (A)
= All solutions to Ax = O. Dimension n  r = (# columns)  rank.

Orthonormal vectors q 1 , ... , q n·
Dot products are q T q j = 0 if i =1= j and q T q i = 1. The matrix Q with these orthonormal columns has Q T Q = I. If m = n then Q T = Q 1 and q 1 ' ... , q n is an orthonormal basis for Rn : every v = L (v T q j )q j •

Partial pivoting.
In each column, choose the largest available pivot to control roundoff; all multipliers have leij I < 1. See condition number.

Particular solution x p.
Any solution to Ax = b; often x p has free variables = o.

Permutation matrix P.
There are n! orders of 1, ... , n. The n! P 's have the rows of I in those orders. P A puts the rows of A in the same order. P is even or odd (det P = 1 or 1) based on the number of row exchanges to reach I.

Plane (or hyperplane) in Rn.
Vectors x with aT x = O. Plane is perpendicular to a =1= O.

Rayleigh quotient q (x) = X T Ax I x T x for symmetric A: Amin < q (x) < Amax.
Those extremes are reached at the eigenvectors x for Amin(A) and Amax(A).

Semidefinite matrix A.
(Positive) semidefinite: all x T Ax > 0, all A > 0; A = any RT R.

Singular matrix A.
A square matrix that has no inverse: det(A) = o.

Skewsymmetric matrix K.
The transpose is K, since Kij = Kji. Eigenvalues are pure imaginary, eigenvectors are orthogonal, eKt is an orthogonal matrix.

Vandermonde matrix V.
V c = b gives coefficients of p(x) = Co + ... + Cn_IXn 1 with P(Xi) = bi. Vij = (Xi)jI and det V = product of (Xk  Xi) for k > i.

Vector v in Rn.
Sequence of n real numbers v = (VI, ... , Vn) = point in Rn.