CS 104 - Lab 10
Due in Blackboard Assignment (one file named lastnameLab10.zip) due week
15 end of Lab (9:50am)
put all the m-files and diary file in one zip file
Objectives:
Tasks:
1. (6 points) Write and test a matlab function requiring reading from a file.
Write a WeatherAccuracy function which reads from the file, file name passed as a String argument to function. The file contains multiple days of high temperature predictions (two days prior and one day prior) and actual high temperature reading (all positive integers). Each line in the input file is for a new day. Here is a sample input file, also create other input files to test your function.
Day Predict2 Predict1 Actual 1 75 77 78 2 74 74 73 3 75 74 72 . . .
Your function should return the worst prediction day; the day number with the overall worst two-day and one-day prediction compared to actual. This is measured by the sum of absolute value of how far off each prediction was for that day. If there is more than one day with the same worst prediction it is fine to return one of the days only.
2. (7 points) Write and test a matlab script to process an image.
2a) Write an mfile script to mirror the image in the center. You can use this image file for input http://www.cs.iit.edu/~cs104/labs/Lab10/IIT_MTCC_Fall.jpg
2b) Write an mfile script to find the red/burgundy tree in the lower left and color it black.You can use this image file for input http://www.cs.iit.edu/~cs104/labs/Lab10/IIT_MTCC_Fall.jpg
3. (7 points) Develop an ethical algorithm and write and test a matlab script requiring reading from a file.
Imagine you are working for Moogle, for a well-known tech company that receives tens of thousands of job applications from graduating seniors every year.
Since the company receives too many job applications for HR to individually assess in a reasonable amount of time, you are asked to create a program that algorithmically looks at applications and selects the ones most worth looking at (and passing onto HR).
It's difficult to create these first-pass cuts, so Moogle designs their application forms to get some numerical data about their applicants' education. Job applicants must enter their gender, citizenship, and the grades they received in 6 core CS courses as well as their overall course average. This is stored as a row in an XLS file which you can access. For example, a student who received the following scores in classes:
Would result in the following row in the XLS file: 10032,0,0,100,95,80,89,91,75,83
Here is the input file http://www.cs.iit.edu/~cs104/labs/Lab10/Moodle.xls
Your job is to
Copyright CS, Illinois Institute of Technology