Wright State University Fall 2015 Department of Mechanical and Materials Engineering ME 1020-02: ENGINEERING PROGRAMMING WITH MATLAB MID-TERM EXAM 3 Open Book, Closed Notes Create a Separate MATLAB Script File for Each Problem Submit all MATLAB files (.m) to Dropbox on Pilot Each MATLAB File Must Have the Following Header: NAME: CIRCLE ONE: GRADE MY EXAM DO NOT GRADE MY EXAM Problem 1 (5 Points): The useful life of a machine bearing depends on its operating temperature, as the following data show. Using Function Discovery principles, determine whether the function is linear, power-law, or exponential, and obtain a functional description of these data. Plot the function and the original data on the same plot. The plot must have axis labels and a title. Estimate a bearing’s life if it operates at 190°F. Show this point on the plot. Do not use any inputs from the user, such as the Basic Curve Fitting Interface or ginput. Temperature (°F) 100 120 140 160 180 200 220 Bearing Life (Hours) 28,000 21,000 15,000 11,000 8,000 6,000 4,000 Problem 2 (5 Points): Data analysis of the breaking strength of a certain fabric shows that it is normally distributed with a mean of 300 lb and a variance of 9. Create a MATLAB Script File to estimate the percentage of fabric samples that will have a breaking strength: a. Less than or equal to 297 lb, b. Within 3 lb of the mean, c. Greater than 303 lb. Problem 3 and 4 are on the back of this page.
12
Embed
ME 1020-02: ENGINEERING PROGRAMMING WITH MATLAB MID …
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Wright State University Fall 2015
Department of Mechanical and Materials Engineering
ME 1020-02: ENGINEERING PROGRAMMING WITH MATLAB
MID-TERM EXAM 3 Open Book, Closed Notes
Create a Separate MATLAB Script File for Each Problem
Submit all MATLAB files (.m) to Dropbox on Pilot
Each MATLAB File Must Have the Following Header:
NAME:
CIRCLE ONE: GRADE MY EXAM DO NOT GRADE MY EXAM
Problem 1 (5 Points): The useful life of a machine bearing depends on its operating temperature, as the
following data show. Using Function Discovery principles, determine whether the function is linear, power-law,
or exponential, and obtain a functional description of these data. Plot the function and the original data on the
same plot. The plot must have axis labels and a title. Estimate a bearing’s life if it operates at 190°F. Show this
point on the plot. Do not use any inputs from the user, such as the Basic Curve Fitting Interface or ginput.
Temperature (°F) 100 120 140 160 180 200 220
Bearing Life (Hours) 28,000 21,000 15,000 11,000 8,000 6,000 4,000
Problem 2 (5 Points): Data analysis of the breaking strength of a certain fabric shows that it is normally
distributed with a mean of 300 lb and a variance of 9. Create a MATLAB Script File to estimate the percentage
of fabric samples that will have a breaking strength:
a. Less than or equal to 297 lb,
b. Within 3 lb of the mean,
c. Greater than 303 lb.
Problem 3 and 4 are on the back of this page.
Problem 3 (5 Points): Create a MATLAB Script File to solve the following problem:
𝑥 − 3𝑦 = 2
𝑥 + 5𝑦 = 18
4𝑥 − 6𝑦 = 10
Plot the equations and the solution over the range 0 ≤ 𝑥 ≤ 10. The plot must have axis labels and a title.
Problem 4 (5 Points): Create a MATLAB Script File to calculate and plot the value of 𝑦 for −5 ≤ 𝑥 ≤ 5.5
using a WHILE loop. Make sure to use a sufficient number of points to create a smooth plot.
𝑦 = 𝑒𝑥+1 for 𝑥 < −1
𝑦 = 2 + cos(𝜋𝑥) for − 1 ≤ 𝑥 < 5
𝑦 = 1 + 10(𝑥 − 5) for 𝑥 ≥ 5
Make sure to give the plot a title and axis labels.
% Problem 1, Mid-Term Exam 3, ME 1020, Fall 2015
clear
clc
disp('Problem 1, Mid-Term Exam 3, ME 1020, Fall 2015: Scott Thomas')
format short
Temperature = [100 120 140 160 180 200 220]
Life = [28000 21000 15000 11000 8000 6000 4000]
figure
plot(Temperature, Life,'o')
xlabel('Temperature (F)')
ylabel('Bearing Life (Hr)')
title('Problem 1: Rectilinear Plot')
figure
loglog(Temperature, Life,'o')
xlabel('Temperature (F)')
ylabel('Bearing Life (Hr)')
title('Problem 1: Loglog Plot')
figure
semilogy(Temperature, Life,'o')
xlabel('Temperature (F)')
ylabel('Bearing Life (Hr)')
title('Problem 1: Semilog y Plot')
disp('Semi-log y plot is linear: Exponential Function')