MATLAB® Programming for Engineers, 6th edition, by Stephen J. Chapman and published by
Cengage Learning, teaches MATLAB® as a technical programming language with an emphasis on problem-solving skills. Students learn how to write clean, efficient and well-documented programs, while gaining an understanding of the many practical functions of MATLAB®. The first nine chapters support and provide a primary resource for today's introduction to programming and problem-solving course for first-year engineering students. The remaining chapters address more advanced topics, such as I/O, object-oriented programming and Graphical User Interfaces. This serves as an ideal resource for a longer course or as a valuable reference tool for engineering students or practicing engineers who use MATLAB®. Available via WebAssign is
MindTap Reader, Cengage's next-generation eBook, and other digital resources.
Question 1 is a Chapter Quiz Question. Chapter Quiz Questions, added in 2020, encourage students to test and apply what they have learned in each chapter. These questions can serve as a quick and useful self-test to help confirm understanding of each concept.
Question 2 uses a user-defined function that accepts a temperature in degrees Fahrenheit and returns the temperature in degrees Celsius.
In Question 3, students write and test a function area2d to calculate the area of a triangle given three bounding points.
Question 4 uses function area2d to calculate the area of a polygon. Then, students write and test a program that accepts an ordered list of points bounding a polygon and calls the function to return the perimeter and area of the polygon.
Question 5 uses function random0 to generate a set of 100,000 random values. Then the data is sorted and the tic and toc is used to time the sort function.
Question 6 uses dice simulation to simulate the throw of a fair die by returning some random integer between 1 and 6 every time that it is called.
Question 7 uses MATLAB® functions to calculate hyperbolic sine, cosine, and tangent functions.
In Question 8 students write and test a function to perform a median filter on a data set.
Question 9 uses a MATLAB® function to calculate the range
r and bearing
at which a ship should see an specific object.
Question 10 uses a function to calculate slope m and intercept b of the least-squares line that best fits an input data set
In Question 11 students create and test an array of 20,000 Rayleigh-distributed random values and plot a histogram of the distribution. Then, they determine the mean and standard deviation of the Rayleigh distribution.
This demo assignment allows many submissions and allows you to try another version of the same question for practice wherever the problem has randomized values.