Docsity

Matlab Homework 1 - Aerospace Computing | ENAE 202, Assignments of Aerospace Engineering

Toggle sidebar
bg1
University of Maryland at College Park
Dept. of Aerospace Engineering
ENAE 202: Aerospace Computing
Matlab Homework #1A
Issued: 15 Feb 2010
Due By: 19 Feb 2010, 5PM
The altitude y(t) of an experimental UAV under autopilot control is given by
y(t) = 5(1 + cteσt cos(ωt +φ))
where c,σ,ωand φare real numbers. Assuming numerical values for these constants are
assigned in the Matlab workspace to the corresponding variables c,sigma,w, and phi, write
a script called hw1a which will accomplish the following tasks:
a.) Create an array ywhich holds the values of y(t) for times tfrom 0 to 90 seconds in
increments of 0.25 seconds. The script should not display these values!
b.) Make a plot of y(t) (vertical axis) vs t(horizontal axis). Label the horizontal axis
ā€œTime (sec)ā€, the vertical axis ā€œAltitude (km)ā€, and the plot itself ā€œAltitude versus timeā€.
c.) Compute and display the maximum altitude ymax achieved by the UAV and the
time tmax at which this maximum occurs.
d.) Overlay a triangular marker on your graph from b.) at the coordinates determined
in c.) of the maximum altitude.
Notes: plotting will be discussed in detail in class on Weds. The relevant Matlab
command is plot if you want to read the online documentation about this command. Like
all our work in Matlab, plot operates on numbers, not symbolic expressions. You must
use the numerical plot command; solutions which use the ezplot command will not be
accepted. Your script must not define any specific numerical values for c,σ, etc, but rather
assume that values for these variables have been defined in the workspace before the script
is run.
1

Partial preview of the text

Download Matlab Homework 1 - Aerospace Computing | ENAE 202 and more Assignments Aerospace Engineering in PDF only on Docsity!

University of Maryland at College Park

Dept. of Aerospace Engineering

ENAE 202: Aerospace Computing

Matlab Homework #1A

Issued: 15 Feb 2010 Due By: 19 Feb 2010, 5PM

The altitude y(t) of an experimental UAV under autopilot control is given by

y(t) = 5(1 + cteσt^ cos(ωt + φ))

where c, σ, ω and φ are real numbers. Assuming numerical values for these constants are assigned in the Matlab workspace to the corresponding variables c, sigma, w, and phi, write a script called hw1a which will accomplish the following tasks:

a.) Create an array y which holds the values of y(t) for times t from 0 to 90 seconds in increments of 0.25 seconds. The script should not display these values!

b.) Make a plot of y(t) (vertical axis) vs t (horizontal axis). Label the horizontal axis ā€œTime (sec)ā€, the vertical axis ā€œAltitude (km)ā€, and the plot itself ā€œAltitude versus timeā€.

c.) Compute and display the maximum altitude ymax achieved by the UAV and the time tmax at which this maximum occurs.

d.) Overlay a triangular marker on your graph from b.) at the coordinates determined in c.) of the maximum altitude.

Notes: plotting will be discussed in detail in class on Weds. The relevant Matlab command is plot if you want to read the online documentation about this command. Like all our work in Matlab, plot operates on numbers, not symbolic expressions. You must use the numerical plot command; solutions which use the ezplot command will not be accepted. Your script must not define any specific numerical values for c, σ, etc, but rather assume that values for these variables have been defined in the workspace before the script is run.