0% found this document useful (0 votes)
12 views4 pages

Homework 3

This document provides instructions for homework assignment 3 in MEE 314-01. It includes 4 problems to solve involving equations for beam deflection, ball trajectory, radio receiver output voltage, and aircraft turning radius. For each problem, students are instructed to write a MATLAB script or function that defines variables, allows for user input if needed, calculates values using equations, and displays results. Guidelines are provided for submitting assignment files and including diagnostic information in a diary file. Solutions are provided for sample test cases to check answers.

Uploaded by

Abdool
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views4 pages

Homework 3

This document provides instructions for homework assignment 3 in MEE 314-01. It includes 4 problems to solve involving equations for beam deflection, ball trajectory, radio receiver output voltage, and aircraft turning radius. For each problem, students are instructed to write a MATLAB script or function that defines variables, allows for user input if needed, calculates values using equations, and displays results. Guidelines are provided for submitting assignment files and including diagnostic information in a diary file. Solutions are provided for sample test cases to check answers.

Uploaded by

Abdool
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

MEE 314-01 – Fall 2015

Homework #3
Due Wednesday, September 16 at 2:30 pm

Homework Submission Guidelines


 NO late assignments will be accepted.
 Upload each script and function .m file that you create for each problem to Isidore under the
Homework #3 Assignment. Also upload a diary .txt file that shows the execution of the test case
for each problem.
 The diary file should be created with the following command (where you input your first and last
names where appropriate):
>> diary(‘FirstName_LastName_HW3.txt’);
 Each .m file should be named “FirstName_LastName_Problem3p1.m” (where you input your first
and last names where appropriate). Include each problem number in the file name as shown
where “Problem3p1” indicates Problem 3.1. Recall that you cannot use special characters in a
MATLAB filename, so you cannot use a ‘.’ In the filename.
 Please follow the file naming convention as it helps us keep files organized when grading.
 Include a descriptive header at the top of each script or function and clearly comment each part
of your code.

Problem 3.1
The deflection 𝑦 (m) of a cantilever beam under a uniform load can be calculated with the following
equation:
𝑞𝑥 2 2
𝑦= (𝑥 − 4𝐿𝑥 + 6𝐿2 )
24𝐸𝐼
where 𝑞 is the applied load (1.5 kN/m)
𝑥 is the distance along the beam (m)
𝐸 is the Young’s modulus of the beam (25000 kPa)
𝐼 is the Moment of Inertia of the beam (12 m4)
𝐿 is the length of the beam (100 m)

Write a script to complete the following tasks:


a) Define variables for each constant defined above.
b) Define a vector 𝑥 with at least 50 values between 0 and 100 m.
c) Calculate the deflection 𝑦 (m) of the beam for each distance along the beam 𝑥. The deflection for
ALL distances should be calculated in one equation HINT: You will need to use the dot operator.
d) Use the appropriate built-in MATLAB function to calculate the minimum and maximum deflection
values and assign the values to variables.
e) Display an output message of your choice and the minimum and maximum deflection values to
the command window using the built-in MATLAB disp function. Show the display messages in
your diary file.

Check your answers with the solutions below:


Solution at 𝑥 = 0 m: Solution at 𝑥 = 100 m:
y = 0 y = 62.5

Page 1
MEE 314-01 – Fall 2015
Homework #3
Due Wednesday, September 16 at 2:30 pm

Problem 3.2
The height ℎ (m) and speed 𝑣 (m/s) of a thrown ball can be calculated with the following equations:
1
ℎ = 𝑣0 𝑡 sin(𝜑) − 𝑔𝑡 2
2
𝑣 = √𝑣02 − 2𝑣0 𝑔𝑡 sin(𝜑) + 𝑔2 𝑡 2
where 𝑣0 is the initial velocity (m/s)
𝑡 is the time (seconds)
𝜑 is initial angle of the ball relative to the ground (degrees)
𝑔 is the acceleration due to gravity (9.81 m/s2)

Write a function to complete the following tasks:


a) Define input arguments for 𝑣0 , 𝜑, and 𝑡. 𝑣0 and 𝜑 are scalar values. The vector 𝑡 should contain
values between 0 seconds and 2 seconds. You can choose the number of values in the vector (pick
at least 100 values).
b) For ALL time values, calculate the height ℎ and speed 𝑣 of the thrown ball given the equations
above. ℎ and 𝑣 should be vectors that are the same size as the 𝑡 vector that you define. HINT: 𝜑
is defined to be an angle in degrees. What is the built-in MATLAB function to calculate the sine of
an angle in degrees?
c) Output the height ℎ and speed 𝑣 using output arguments. HINT: An output argument is different
from using the disp function. You should NOT use both in a function! Show the output
arguments for BOTH test cases below in your diary file.

Test Case 1: Test the function with the 𝑡 vector defined above and the following values.
𝑣0 = 20 m/s
𝜑 = 40 degrees

Check your answers with the solution below:


Solution at t = 0 seconds: Solution at t = 2 seconds:
h = 0 h = 6.0915
v = 20 v = 16.7477

Test Case 2: Test the function with the 𝑡 vector defined above and any values for 𝑣0 and 𝜑 except the
values for Test Case 1.

HINT: Remember that the easiest way to run a function is to copy everything from the first line of the
function except the word function and paste that line into the command window with the appropriate
inputs. If the function is named Problem3p2, I would run the function by entering the following into the
command window.
[h,v] = Problem3p2(v0,phi,t)

Page 2
MEE 314-01 – Fall 2015
Homework #3
Due Wednesday, September 16 at 2:30 pm

Problem 3.3
The output voltage 𝑣 (volts) of a radio receiver can be calculated with the following equation:
𝑣𝑖 𝑅
𝑣=
2
√𝑅 2 + (𝜔𝐿 − 1 )
𝜔𝐶
where 𝑣𝑖 is the input voltage (10 x 10-3 volts)
𝑅 is the resistance (50 Ohms)
𝐿 is the inductance (0.25 x 10-3 Henry)
𝐶 is the capacitance (0.1 x 10-9 Farad)
𝜔 is the angular frequency (rad/s) and can be calculated with the following equation:
𝜔 = 2𝜋𝑓
where 𝑓 is the resonant frequency (Hz)

Write a script to complete the following tasks:


a) Define variables for each constant defined above.
b) Allow the user to interactively input the frequency 𝑓 by using the built-in MATLAB input function.
𝑓 should be a vector of values between 0.7 x 106 and 1.3 x 106 Hz. You can choose the
number of values as long as you have at least 10 values.
c) Calculate the angular frequency 𝜔 and output voltage 𝑣 for all of the frequencies. HINT: You will
need to use the dot operator.
d) Use the appropriate built-in MATLAB functions to calculate the average angular frequency 𝜔 and
the average output voltage 𝑣.
e) Display an output message of your choice and the average angular frequency 𝜔 and the average
output voltage 𝑣 to the command window using the built-in MATLAB disp function.

Check your answers with the solution below:


Solution at 𝑓 = 0.7 x 106 Hz: Solution at 𝑓 = 1.3 x 106 Hz:
v = 4.2548e-04 v = 6.1028e-04

Problem 3.4
The turning radius 𝑟 (m) of an aircraft can be calculated with the following equation:
(𝑣𝑚)2
𝑟=
𝑎𝑔
where 𝑣 is the aircraft speed (Mach)
𝑚 is the speed of sound (340 m/s)
𝑎 is maximum acceleration of the aircraft (2 g)
𝑔 is the acceleration due to gravity (9.81 m/s2)

Write a function to complete the following tasks:


a) Define an input argument for the speed 𝑣. The vector 𝑣 should contain values between 0.5 Mach
and 2 Mach. You can choose the number of values in the vector (pick at least 20 values).
b) For ALL speed values, calculate the turning radius 𝑟 given the equation above.
c) Output the turning radius 𝑟 using an output argument. HINT: An output argument is different
from using the disp function. You should NOT use both in a function! Show the output argument
in your diary file.

Page 3
MEE 314-01 – Fall 2015
Homework #3
Due Wednesday, September 16 at 2:30 pm

Check your answers with the solution below:


Solution at v = 0.5 Mach: Solution at v = 2.0 Mach:
r = 1.4730e+03 r = 2.3568e+04

Page 4

You might also like