Docstoc

Programming with MATLAB Assignment

Document Sample
Programming with MATLAB Assignment Powered By Docstoc
					                             ESC 152
             [Engineering] Programming with MATLAB
                 Summer 2012 [Course # 5673]
                    TR 3:30 – 5:50 PM, SH 125




Homework No. 4
     (Due Thursday, June 21, 2012)


For each Problem, submit [You can compress all your files together,
and upload a single ZIP/RAR file, please add comments]
     1. A MATLAB Program/Script [the “m” file], and [80%]
     2. An Output File [a “txt” or “doc” file with your results, and
     comments, if appropriate] – [20%]

Problem 1: [Adapted from] Exercise 4.26 [40 points]
Problem 2: [An extension to] Exercise 3.19 [60 points]


In-Class Exercise
     N/A
Problem 1: Adapted from Textbook Problem 4.26 [40 points]
The file “Golf_Tournaments.xlsx” contains data from different Golf
rounds. Modify the script [examined in class] “golf_score_card.m”
such as it reads the data for the [worksheet] “Homework
Tournament” and it calculates the Final Score [points]
a) Your script should produce a Table with data for all players and
   their Final Scores.
b) Can you expand tour script such as it can identify the top player?
c) How would you go about identifying the second, third … prizes?
Submit a copy of your [modified] script along with the output
displayed in the command window [with comments as you consider
them appropriate]
Extra-credit [5 points]
Modify your script such as it produces a bar plot showing the number
of “eagles,” “pars,” etc...
Problem 2: “Engineering the slugger’s swing” [60 points]
The trajectory of a baseball when hit by a batter can be
approximated [cf. schematic and equations attached] using the
parabolic flight equations examined in the class examples.
We want to help the Cleveland Indians by providing our engineering
assistance to Manny Acta (the Indian’s manager). The players asked
Coach Acta for a Table showing the distances reached by hitting the
baseball at different angles, for fast (90-100 mph) and curve (70-80
mph) balls (pitches).
Using the schematic and equations attached
a) Write a script that would generate such a table for a user-
defined “pitch-velocity” (Vo). [35 points]
b) If we knew that the next team starting pitcher has an average
fast-ball with an average “pitching-velocity” of 95 mph.
b.1. What would be the “hitting angle” () that would ensure the ball
reaches the farthest from home plate? [10 points]
b.2. What would be the minimum “hitting angle” () needed to hit a
home-run? [15 points]
Extra-credit [10 points]
Can you also provide a plot showing the trajectories of the baseball
hit at different angles?
Schematic and Equations for Problem 2

				
DOCUMENT INFO
Shared By:
Stats:
views:10
posted:6/22/2012
language:English
pages:3