ENGRCEE 21 - COMPUTATIONAL PROBLEM SOLVING
COMPUTATIONAL PROBLEM SOLVING
Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
ENGRCEE 21 - COMPUTATIONAL PROBLEM SOLVING
FINAL PROJECT
As described in the class syllabus, part of your grade will be assessed by the completion of a
design project. You will work in groups of 4-5 people to a group. You will be graded on the
successful completion of the project objectives and on your contribution to the group effort as
evaluated by other group members.
There will be some in-class time for project work during lab sessions in Weeks 8 and 10,
however I encourage you to set up times to meet with your group outside of lab sessions as well.
FINAL PROJECT REPORT
You will submit a document in which you solve the problem below using the problem-solving
methodology that we discussed in Lecture 3.
Engineering Problem-Solving Methodology:
1. State the problem clearly.
2. Describe the input and output information.
3. Code your solution. In addition to the final script/function of your code, which
executes the solution, it is a good programming habit to include comments and/or
pseudo-code throughout your m-files.
4. Display your solution using any appropriate graphs, tables, or charts.
5. Discuss your results.
The report will be submitted electronically in PDF format to a Canvas directory setup for the
class (details on this soon). You only need to submit 1 report per group (from 1 member’s
Canvas account)
EVALUATIONS OF GROUP MEMBERS
A Group Evaluation will comprise 20% of your grade for the final project. The evaluation is
meant to assess the performance/effort of each group member. For the evaluation, please upload
to Canvas a Word Document with the following table filled out:
Student Name Grade (0 – no effort, 5 maximum effort)
Me (your name) #
Group member 1 #
Group member 2 #
Group member 3 #
Group member 4 #
Your evaluations of group members will be confidential. But this is a very important part of your
project grade! Please upload your evaluation to Canvas, each member of the group should
submit their own evaluation of their group members.
DEADLINES:
1. Wednesday, May 18th: Register your group on Canvas > People > Groups (someone
from your group should add a group and all member names)
2. Friday, June 3: Final Project Report (80%)
3. Friday, June 3: Evaluations of Group Members (20%)
2
Problem Statement – Weather App
In this problem you will write a code that will return some information about air
temperatures such that you might find available in a weather app.
Download at least a week of hourly air temperature data (“Normals Hourly”) for a station of your
choosing (could be your hometown, could be just a place you’re interested in!). It doesn’t matter
which week… or even which year! Each person in the group should download a week of data
from a different place.
You will write a MATLAB function, called TempAnalysis, to do the following analysis, and this
function should be flexible enough to accept any of your group members’ data as an input (you
should be able to use the same function for each data set). The deliverables for the analysis are as
follows:
1) Each group member should download a week of data for a different station. You will
need to “add to cart” the data from your city, and then download as a CSV. We will go
over how to download data in lecture.
2) Load the data into MATLAB; depending on what your input file is (.csv, .xlsx, .txt, …),
you may find any of the following built-in functions useful: importdata, xlsread,
textscan, or even the ‘Import Data’ button. There are multiple ways to successfully
import your data into MATLAB; however, it is important that your data is in a readable
format. Therefore, if an inappropriate input file or poorly formatted data is passed to your
function, your code should be capable of error-checking, and upon encountering
unreadable input data, should output an error message.
3) Once your data is read into MATLAB, convert the time stamp values for the data into
MATLAB time using the built-in datenum function and it’s associated functions.
Your function will then create 3 subplots. All axes should be labeled appropriately (i.e.
the y-axis should have units of °F or, preferably, °C), and all data series should be
concisely described in a legend. Different data series should be identified using different
line properties (such as different colors or markers).
4) On the 1st subplot, your function should plot your data for the whole week. You may
want to use the datetick function to format the dates on your plot.
5) Your function should interpolate the data to be every half hour (12:00, 12:30, 1:00, 1:30,
2:00, 2:30, …). Therefore, if your data is sampled every hour, we want you to interpolate
between all your data points. Try using different interpolation techniques (pchip, linear,
nearest, spline), and give reasoning for the one you choose. On the 2nd subplot, plot the
interpolated data for the different techniques you used.
6) On the 3rd subplot, using the full week of data, create and plot a composite day of
temperature for the week you have downloaded (and interpolated if necessary). For
example, average the 12am temperature for all 7 days at 12am, and repeat this for each
hour of the day.
7) Next, your code should compute the daily mean temperature for each day of the week
you have downloaded, using the interpolated data you have just created.
8) Calculate an average temperature for the week of data you have downloaded. Using the
daily averages calculated above, find a daily temperature anomaly.
Daily Anomaly = Daily average – Week Average
3
9) Finally, compute a cumulative anomaly for the week of data that you have downloaded.
This should be in units of °C – day.
10) In addition to producing the 3 subplots, your function should output the vector of daily
mean temperatures, the vector of daily anomalies, and the scalar cumulative anomaly.
Give these 3 outputs appropriate and descriptive names.
11) In the command window, call TempAnalysis and pass any one of your data sets as an
argument. Be sure to keep your fingers crossed that no red text promptly appears in the
command window; if so, feel free to return to any/all of steps 1-10.
What you should submit, as a pdf file:
o A cover page that clearly identifies your group members
o The stations you analyzed, as well as the formats of data you worked with. While you do
NOT need to include your actual data files, it is important to acknowledge the agency that
provided you with your data. Please include a data citation in your report.
o A section briefly describing your code, including the strategies you chose to handle error-
checking, your interpolation method decision-making process, and any methods you used
to resolve obstacles you may have encountered along the way.
o The plots your function created, with a concise and descriptive caption.
o As a clearly identified section in the end of the document, include your complete
MATLAB function (simply copy and paste the entire code).
Have fun and be creative! There is more than one way to complete this assignment.