New Semester
Started
Get
50% OFF
Study Help!
--h --m --s
Claim Now
Question Answers
Textbooks
Find textbooks, questions and answers
Oops, something went wrong!
Change your search query and then try again
S
Books
FREE
Study Help
Expert Questions
Accounting
General Management
Mathematics
Finance
Organizational Behaviour
Law
Physics
Operating System
Management Leadership
Sociology
Programming
Marketing
Database
Computer Network
Economics
Textbooks Solutions
Accounting
Managerial Accounting
Management Leadership
Cost Accounting
Statistics
Business Law
Corporate Finance
Finance
Economics
Auditing
Tutors
Online Tutors
Find a Tutor
Hire a Tutor
Become a Tutor
AI Tutor
AI Study Planner
NEW
Sell Books
Search
Search
Sign In
Register
study help
business
systems analysis and design using matlab
MATLAB An Introduction With Applications 6th Edition Amos Gilat - Solutions
10. The relative humidity, RH, at sea level can be calculated from measured values of the dry-bulb temperature, , and the wet-bulb temperature by(temperatures in degrees Celsius):where VP is the vapor pressure given by:and SVP is the saturated vapor pressure given by:Write a user-defined function
9. A paper cup is designed to have a geometry of a frustum of a cone. Write a user-defined function that determines the volume and the surface area (side plus bottom) of the cup for given values of r, R, and h. For the function name and arguments, use [V, S] =VolSArea(r,R,h). The input arguments r,
8. The fuel tank shown in the figure in shaped as a half a sphere with in.Write a user-defined function that calculates the volume of fuel in the tank (in gallons) as a function of the height y (measured from the bottom). For the function name and arguments, use V = Volfuel(y). Use the function to
7. The body surface area (BSA) in m2 of a person (used for determining dosage of medications) can be calculated by the formula (Mosteller formula):in which H is the person’s height in inches, and W is the persons weight in lb.Write a MATLAB user-defined function that calculates the body surface
6. Write a user-defined MATLAB function that converts torque given in units of N-m to torque in units of lb-ft. For the function name and arguments, use lbft = NmTOlbft(Nm). The input argument Nm is the torque in N-m, and the output argument lbft is the torque in lb-ft (rounded to the nearest
5. Tables of material properties list density, in units of kg/m3, when the international system of units (SI) is used, and list specific weight, in units of lb/in.3, when the U.S. customary system of units is used. Write a user-defined MATLAB function that converts density to specific weight. For
4. Pressure in U.S. customary units is measured in psi (pound per square inch).In SI metric units pressure is measured in Pa (N/m2). Write a user-defined MATLAB function that converts pressure given in units of psi to pressure in units of Pa. For the function name and arguments, use [Pa] =
3. In the U.S. fuel efficiency of cars is specified in miles per gallon (mpg). In Europe it is often expressed in liters per 100 km. Write a MATLAB userdefined function that converts fuel efficiency from mpg to liters per 100 km.For the function name and arguments, use Lkm=mpgToLpkm(mpg). The input
2. Write a user-defined MATLAB function for the following math function:The input to the function is (in radians) and the output is r. Write the function such that can be a vector.(a) Use the function to calculate r( /6) and r(5 /6).(b) Use the function to plot (polar plot) r( ) for .
1. Write a user-defined MATLAB function for the following math function:The input to the function is x and the output is y. Write the function such that x can be a vector (use element-by-element operations).(a) Use the function to calculate y(–2) and y(4).(b) Use the function to make a plot of
39. The following MATLAB commands create a sine-shaped signal y(t) that contains random noise:t = 0:.05:10;y = sin(t)-0.1+0.2*rand(1,length(t));Write a MATLAB program that uses these commands to create a noisy sine-shaped signal. Then the program smooths the signal by using the threepoints
38. A Keith number is a number (integer) that appears in a Fibonacci-like sequence that is based on its own decimal digits. For two-decimal digit numbers(10 through 99) a Fibonacci-like sequence is created in which the first element is the tens digit and the second element is the units digit. The
37. The overall grade in a course is determined from the grades of 10 homework assignments, 2 midterms, and a final exam, using the following scheme:Homework: Homework assignments are graded on a scale from 0 to 80. The grade of the two lowest assignments is dropped and the average of the eight
36. The roots of a cubic equation can be calculated using the following procedure:Set: , , and .Calculate: , where and .If the equation has complex roots.If all roots are real and at least two are equal. The roots are given by:, , and .If all roots are real and are given by:, , and, where .Write a
35. The Sierpinski triangle can be implemented in MATLAB by plotting points iteratively according to one of the following three rules that are selected randomly with equal probability.Rule 1: , Rule 2: , Rule 3: , Write a program in a script file that calculates the x and y vectors and then plots y
34. In a one-dimensional random walk, the position x of a walker is computed by:where s is a random number. Write a program that calculates the number of steps required for the walker to reach a boundary . Use MATLAB’s built-in function randn(1,1) to calculate s. Run the program 100 times(by
33. Write a program in a script file that converts a measure of area given in units of either m2, cm2, in2, ft2, yd2, or acre to the equivalent quantity in different units specified by the user. The program asks the user to enter a numerical value for the size of an area, its current units, and the
32. One numerical method for calculating the cubic root of a number, is Halley’s method. The solution process starts by choosing a value as a first estimate of the solution. Using this value, a second, more accurate value is calculated with , which is then used for calculating a third, still more
31. The concentration of a drug in the body can be modeled by the equation:where is the dosage administered (mg), is the volume of distribution(L), is the absorption rate constant (h–1), is the elimination rate constant(h–1), and t is the time (h) since the drug was administered. For a certain
30. Write a program that determines the change given back to a customer in a self-service checkout machine of a supermarket for purchases of up to $50.The program generates a random number between 0.01 and 50.00 and displays the number as the amount to be paid. The program then asks the user to
29. Write a program in a script file that calculates the cost of renting a car according to the following price schedule:The program asks the user to enter the type of car (sedan or SUV), the number of days, and the number of miles driven. The program then displays the cost (rounded to cents) for
28. Body mass index (BMI) is a measure of obesity. In standard units, it is calculated by the formula where W is weight in pounds, and H is height in inches. The obesity classification is:Write a program in a script file that calculates the BMI of a person. The program asks the person to enter his
27. The following are formulas for calculating the training heart rate (THR):where MHR is the maximum heart rate given by (https://en.wikipedia.org/wiki/Heart_rate):For males: , for females: , RHR is the resting heart rate, and INTEN the fitness level (0.55 for low, 0.65 for medium, and 0.8 for
26. Write a MATLAB program in a script file that finds a positive integer n such that the sum of all the integers is a number between 100 and 1,000 whose three digits are identical. As output, the program displays the integer n and the corresponding sum.
25. The Taylor series expansion for ax is:Write a MATLAB program that determines ax using the Taylor series expansion. The program asks the user to type a value for x. Use a loop for adding the terms of the Taylor series. If cn is the nth term in the series, then the sum Sn of the n terms is . In
24. A list of exam scores (S) (in percent out of 100%) is given: 72, 81, 44, 68, 90, 53, 80, 75, 74, 65, 50, 92, 85, 69, 41, 73, 70, 86, 61, 65, 79, 94, 69.Write a computer program that calculates the average (Av) and standard deviation (Sd) of the scores, which are rounded to the nearest integer.
23. A perfect number is a positive integer that is equal to the sum of its positive divisors except the number itself. The first two perfect numbers are 6 and 28 since and . Write a computer program that finds the first four perfect numbers.
22. A Mersenne prime is a prime number that is equal to , where n is an integer.For example, 31 is a Mersenne prime since . Write a computer program that finds all the Mersenne primes between 1 and 10,000. Do not use MATLAB’s built-in function isprime.
21. Sexy primes are two prime numbers that the difference between them is 6. For example, 23 and 29 are sexy primes since . Write a computer program that finds all the sexy primes between 1 and 300. The numbers should be displayed in a two-column matrix where each row displays one pair. Do not use
20. A safe prime is a prime number that can be written in the form where p is also a prime number. For example, 47 is a safe prime since and 23 is also a prime number. Write a computer program that finds and displays all the safe primes between 1 and 1,000. Do not use MATLAB’s built-in function
19. Write a MATLAB program in a script file that finds and displays all the numbers between 100 and 999 whose product of digits is 6 times the sum of the digits. [e.g. 347 since ]. Use a for-end loop in the program.The loop should start from 100 and end at 999.
18. The Pythagorean theorem states that . Write a MATLAB program in a script file that finds all the combinations of triplesa, b, and c that are positive integers all smaller or equal to 50 that satisfy the Pythagorean theorem. Display the results in a three-column table in which every row
17. A vector is given by x = [9 –1.5 13.4 13.3 –2.1 4.6 1.1 5 –6.1 10 0.2].Using conditional statements and loops, write a program that rearranges the elements of x in order from the smallest to the largest. Do not use MATLAB’s built-in function sort.
16. Write a program that (a) generates a vector with 20 random integer elements with integers between 10 and 30, (b) replaces all the elements that are not even integers with random integers between 10 and 30, and (c) repeats (b)until all the elements are even integers. The program should also
15. The value of can be estimated from the expression:Write a MATLAB program in a script file that determine for any number of terms. The program asks the user to enter the number of terms, and then calculates the corresponding value of . Execute the program with 5, 10, and 40 terms. Compare the
14. The value of can be estimated from:Write a program (using a loop) that determines for a given n. Run the program with n = 10, n = 100, and n = 1,000. Compare the result with pi. (Use format long.)
13. The reciprocal Fibonacci constant is defined by the infinite sum:where are the Fibonacci numbers 1, 1, 2, 3, 5, 8, 13, ... . Each element in this sequence of numbers is the sum of the previous two. Start by setting the first two elements equal to 1, then . Write a MATLAB program in a script
12. Fibonacci numbers are the numbers in a sequence in which the first three elements are 0, 1, and 1, and the value of each subsequent element is the sum of the previous three elements:0, 1, 1, 2, 4, 7, 13, 24, ...Write a MATLAB program in a script file that determines and displays the first 25
11. The Pascal triangle can be displayed as elements in a lower-triangular matrix as shown on the right. Write a MATLAB program that creates a matrix that displays n rows of Pascal’s triangle. Use the program to create 4 and 7 rows Pascal’s triangles. (One way to calculate the value of the
10. The daily high temperature (°F) in New York City and Denver, Colorado, during the month of January 2014 is given in the vectors below (data from the U.S. National Oceanic and Atmospheric Administration).NYC = [33 33 18 29 40 55 19 22 32 37 58 54 51 52 45 41 45 39 36 45 33 18 19 19 28 34 44 21
9. Write a program that asks the user to input a vector of integers of arbitrary length. Then, using a for-end loop the program eliminates all the negative elements. The program displays the vector that was entered and the modified vector, and a message that says how many elements were
8. Write a program that asks the user to input a vector of integers of arbitrary length. Then, using a for-end loop the program examines each element of the vector. If the element is positive, its value is doubled. If the element is negative, its value is tripled. The program displays the vector
7. Write a program that generates a vector with 30 random integers between–20 and 20 and then finds the sum of all the elements that are divisible by 3.
6. Use loops to create a matrix in which the value of each element is two times its row number minus three times its column number. For example, the value of element (2,5) is .
5. Evaluate the following expressions without using MATLAB. Check the answers with MATLAB.(a) 0|7&9&–3 (b) 7>6&~0
4. Use the vectors v and w from Problem 3. Use relational operators to create a vector u that is made up of the elements of v that are smaller than or equal to the elements of w.
3. Given: v = [–2 4 1 0 2 1 2 ] and w = [2 5 0 1 2 –1 3 ]. Evaluate the following expressions without using MATLAB. Check the answers with MATLAB.(a) ~v ==~w (b) w > = v(c) v > ~ –1*w (d) v > –1*w
2. Given: , , . Evaluate the following expressions without using MATLAB. Check the answers with MATLAB.(a) (b)(c) (d)
1. Evaluate the following expressions without using MATLAB. Check the answers with MATLAB.(a) (b)(c) (d)
40. The Taylor series expansion for is:Plot the figure on the right, which shows, for , the plot of the function and plots of the Taylor series expansion of with two, three, and five terms.Label the axes and display a legend.
39. The shape of a asymmetric four-digit series NACA airfoil is described by the equations:where the subscripts U and L corresponds to the upper and lower airfoil surface, respectively. yt is half the thickness of the foil given by:where c is the cord length, t is the maximum thickness (as a
38. Biological oxygen demand (BOD) is a measure of the relative oxygen depletion effect of a waste contaminant and is widely used to assess the amount of pollution in a water source. The BOD in the effluent ( in mg/L) of a rock filter without recirculation is given by:where is the influent BOD
37. A simply supported beam is loaded as shown. The shear force V and bending moment M as a function of x are given by the following equations:lb lb-ft for ft.lb, lb-ft for ft lb, lb-ft for ft.Plot the shear force and the bending moment as a function of x (two figures on one page such that the
36. A monochromatic light that passes through a double slit produces on a screen a diffraction pattern consisting of bright and dark fringes. The intensity of the bright fringes, I, as a function of can be calculated by:where and , is the light wave length, a is the width of the slits, and d is the
35. Consider the diode circuit shown in the figure.The current and the voltage can be determined from the solution of the following system of equations:, The system can be solved numerically or graphically. The graphical solution is found by plotting as a function of from both equations. The
34. Two sound waves of slightly different frequencies f1 and f2:produce sound that is alternating loud and soft. This phenomenon, which is called beating, is described by the equation:Make a plot of the beating sound (shown) for s for the case that Hz and Hz.
33. The ideal gas equation states that , where P is the pressure, V is the volume, T is the temperature, (L atm)/(mol K) is the gas constant, and n is the number of moles. Real gases, especially at high pressures, deviate from this behavior.Their response can be modeled with the van der Waals
32. A railroad bumper is designed to slow down a rapidly moving railroad car. After a 20,000-kg railroad car traveling at 20 m/s engages the bumper, its displacement x (in meters) and velocity v (in m/s) as a function of time t (in seconds) is given by:and Plot the displacement and the velocity as
31. According to special relativity, a rod of length L moving at velocity v will shorten by an amount , given by:where c is the speed of light (about m/s). Consider a rod of 2 m long, and make three plots of as a function of v for m/s.In the first plot use linear scale for both axes. In the second
30. In a typical tension test a dog-bone shaped specimen is pulled in a machine. During the test, the force F needed to pull the specimen and the length L of a gauge section are measured. This data is used for plotting a stress-strain diagram of the material. Two definitions, engineering and true,
29. A resistor, R = 4 , and an inductor, L = 1.3 H, are connected in a circuit to a voltage source as shown in Figure (a) (an RL circuit). When the voltage source applies a rectangular voltage pulse with an amplitude of V = 12 V and a duration of 0.5 s, as shown in Figure (b), the current i(t) in
28. A high-pass filter passes signals with frequencies that are higher than a certain cutoff frequency.In this filter the ratio of the magnitudes of the voltages is given by:where is the frequency of the input signal. Given and F, plot as a function of f for Hz. Use logarithmic scale for the
27. According to Planck’s law of blackbody radiation, the spectral energy density R as a function of wavelength(m) and temperature T (K) is given by:where m/s is the speed of light, J-s is the Planck constant, and J/K is Boltzmann constant. Make the shown figure that contains plots of R as a
26. The position x as a function of time of a particle that moves along a straight line is given by:ft The velocity v(t) of the particle is determined by the derivative of x(t) with respect to t, and the acceleration a(t) is determined by the derivative of v(t)with respect to t.Derive the
25. The height and speed of a projectile shoot at a speed v0 at an angle as a function of time are given by:where m/s2. Determine the time that the projectile will hit the ground and plot the height and the speed as a function of time (two plots on one page) for the case that m/s and. Add titles
24. The curvilinear motion of a particle is defined by the following parametric equations:m m The velocity of the particle is given by, where and .For s make one plot that shows the position of the particle (y versus x)and a second plot (on the same page) of the velocity of the particle as a
23. The force F (in N) acting between a particle with a charge q and a round disk with a radius R and a charge Q is given by the equation:where C2/(N-m2) is the permittivity constant and z is the distance to the particle.Consider the case where C, C, and m. Make a plot of F as a function of z for
22. The voltage t seconds after closing the switch in the circuit shown is given by:Plot as a function of t for s. Label the axes. V, , and F.
21. The following data gives the height (in inches) of a sunflower plant as a function of time (days after it was planted).The height can be modeled by the logistic function:where H is the height (in.) and t is the time (days). Make a plot of the height versus time. The figure should show the data
20. Plot two ellipses is one figure (shown). The ellipse with the solid line has major axes of and . The ellipse with the dashed line is the solid-line ellipse rotated by 30º.
19. Make a plot (shown) of the function:(Hint: Rewrite the function in a polar form.)
18. Make a polar plot of the function:for The plot is shown on the right.
17. Make a polar plot of the function:for The plot, shown in the figure, is Fermat’s spiral.
16. The shape of the pretzel shown is given by the following parametric equations:where . Make a plot of the pretzel.
15. The shape of the heart shown in the figure is given by the equation:Make a plot of the heart.
14. Plot the function for . Notice that the function has two vertical asymptotes. Plot the function by dividing the domain of x into three parts: one from –4 to near the left asymptote, one between the two asymptotes, and one from near the right asymptote to 4. Set the range of the y axis from
13. Plot the function in the domain . Notice that the function has a vertical asymptote at . Plot the function by creating two vectors for the domain of x. The first vector (name it x1) includes elements from 0 to 1.9, and the second vector (name it x2) includes elements from 2.1 to 4. For each x
12. Make the plot of the astroid that is shown in the previous problem by using the parametric equation:and for .
11. A plot of an astroid is shown in the figure on the right. Make the plot using the Cartesian equation:
10. The butterfly curve (Fay, T. H. "The Butterfly Curve." Amer. Math. Monthly 96, pp. 442-443, 1989) is given by the following parametric equations:On one page make two plots of butterfly curves.One for and the other for .
9. A parametric equation is given by, Plot the function for . Format the plot such that both axes will range from –1.5 to 1.5.
8. The orbit of the planet Mercury around the sun can be approximated by the equation miles. Make a plot of the orbit.
7. Plot the function and its derivative, both on the same plot, for . Plot the function with a solid line and the derivative with a dashed line. Add a legend and label the axes.
6. Use the fplot command to plot the function for.
5. Make two separate plots of the function , one plot for and one for .
4. Plot the function and its derivative for in one figure.Plot the function with a solid line, and the derivative with a dashed line. Add a legend and label the axes.
3. Use the plot command to plot the function for .
2. Use the plot command to plot the function for .
1. Use the plot command to plot the function for.
29. The heat index HI, calculated from the air temperature and relative humidity, is the apparent temperature felt by the body. An equation used by the National Weather Service for calculating the HI is given by:where T is the temperature in °F, and R is the relative humidity in integer
28. The dissolution of copper sulfide in aqueous nitric acid is described by the following chemical equation:where the coefficientsa, b,c, d,e, f, and g are the numbers of the various molecules participating in the reaction and are unknown. The unknown coefficients are determined by balancing each
27. During a golf match, a certain number of points are awarded for each eagle and a different number for each birdie. No points are awarded for par, and a certain number of points are deducted for each bogey and a different number deducted for each double bogey (or worse). The newspaper report of
26. The surface of many airfoils can be described with an equation of the form where t is the maximum thickness as a fraction of the chord length c (e.g.,). Given that m and m, the following values for y have been measured for a particular airfoil:Determine the constants , and . (Write a system of
25. The graph of the function passes through the points (–2.5, –62), (–1.5, –7.2), (–0.5, 8.3), (1, 3.7), and (3, 45.7). Determine the constantsa, b,c, d, ande. (Write a system of five equations with four unknowns, and use MATLAB to solve the equations.)
24. The graph of the function passes through the points(–1.2, 18.8), (0.2, 5), (2, 16), and (3.5, 15). Determine the constantsa, b,c, andd. (Write a system of four equations with four unknowns, and use MATLAB to solve the equations.)
23. A truss is a structure made of members joined at their ends. For the truss shown in the figure, the forces in the seven members are determined by solving the following system of seven equations.,,,, Write the equations in matrix form and use MATLAB to determine the forces in the members. A
22. A truss is a structure made of members joined at their ends. For the truss shown in the figure, the forces in the 11 members are determined by solving the following system of 11 equations:, ,,, ,, , ,, Write the equations in matrix form and use MATLAB to determine the forces in the members. A
21. The equation of a circle in a plane with radius R and a center at point is given by:The equation can also be written in the form:where Given the coordinates of three points , , and it is possible to determine the radius and the coordinates of the center of the circle that passes through the
20. The net heat exchange by radiation from plate 1 with radius b to plate 2 with radius a that are separated by a distance c is given by:where and are the absolute temperatures of the plates, W/(m2-K4) is the Stefan-Boltzmann constant, and is a shape factor which, for the arrangement in the
19. The pressure drop p in pascals (Pa) for a fluid flowing in a pipe with a sudden increase in diameter is given by:where is the density of the fluid, v, the velocity of the flow, and d and D are defined in the figure. Write a program in a script file that calculates the pressure drop p. When the
Showing 1000 - 1100
of 2697
First
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Last
Step by Step Answers