Reference no: EM13771885
Programming for Engineers (MATLAB)
Laboratory 4 - Formatted Output
Objectives: Demonstrate ability to produce a specified table of output. Demonstrate ability to convert a flowchart into a working MATLAB script file.
Exercise A
Data for several moons orbiting several different planets in our solar system is stored in the file L:\engr1120\MATLABCraveMmoons.mat Use the formulas from Laboratory #3 to evaluate the lunar characteristics for all moons in the data file. Assume that all of the units are consistent with those from Laboratory #3. NOTE that the equations may need to be modified slightly to accommodate different vector variables, if applicable. Also, modify the output so that a table is produced using the exact format defined below, there are 5 spaces between columns.
Lunar Angular
Radius Velocity Period
(m) (rad/sec) (days)
#.###e+## #.###e+## ###.#
Exercise B
The flowchart on the following page describes a program that will begin by defining a vector of temperature values, given in Fahrenheit. The program then converts these temperatures into the other units commonly used for temperature: Celsius, Kelvin, and Rankine. The output from this program is to be a table showing the input temperature values and the corresponding converted temperature values, in columns.
You are to convert this flowchart into a MATLAB script M-file. The output table is to be properly labeled and have values that are appropriately aligned.
Test your program with various types of temperature vectors. For example, try using:
• one scalar input value
• a row vector of evenly spaced values (using the colon operator)
• a row vector of evenly spaced values (using the linspace function)
• a row vector of random values
• a column vector of random values (what would need to be changed in your script file?)
SUBMIT: Turn in a copy of the script file and a copy of the example output for Exercise B only. For the example output you are to use at least 5 temperature values that include 0, 32, & 212°F.
Waste materials on soil and water quality
: Select two waste products and two fossil fuels. Describe the effects of your selected waste materials on soil and water quality. Explain how your selected waste materials and fossil fuels affect biological diversity in the environment.
|
Compare and discuss two basic categories of health policies
: Compare and discuss the two basic categories of health policies. Give an example of federal or state legislation that reflect each category
|
Persuasion is the ability to use argument or discussion
: Persuasion is the ability to use argument or discussion to change an individual's beliefs or actions. In your own career, when might you find it necessary to be persuasive? What techniques are effective or ineffective in persuading others to accept y..
|
Summarize jurisdictional hearings
: Summarize jurisdictional hearings-Based on this week's first class discussion and what your local community is doing to help prevent juvenile delinquency, how can you become active in your community to support these programs
|
Demonstrate ability to produce a specified table of output
: Demonstrate ability to produce a specified table of output. Demonstrate ability to convert a flowchart into a working MATLAB script file.
|
What inference can be made regarding back translation
: What inference can be made regarding back translation? Which of the following is considered a cultural group? Professional group. Religious group. Country of origin.
|
Do you think it is a positive or a negative
: Discuss the Electoral College. Do you think it is a positive or a negative for the American political system? Why is it a positive or a negative
|
Discuss the nature and growth of high-tech crime
: A prominent local newspaper in the Washington, DC area has learned through federal channels of the expertise exemplified by your company, XY Investigative Services (XYIS) and would to interview you to discuss the nature and growth of high-tech cri..
|
Deficit balance of payments
: Your company, a leading farm equipment manufacturing multinational, has a production facility in South Korea to serve the East Asian countries. For the last two years the South Korean operation has been running a deficit balance of payments situat..
|