Question: Instructions: In addition to this document, you will also need the two excel files ProjectileData.xlsx and HydrogenPeroxide.xlsx . The files are on Moodle in the

Instructions:
In addition to this document, you will also need the two excel files ProjectileData.xlsx and
HydrogenPeroxide.xlsx. The files are on Moodle in the Curve Fitting and Interpolation topic area
(same general location where you found this file.) Put both of this files in your current MATLAB
directory.
Problem 1: Curve Fitting Trajectory of Projectile
The excel file, ProjectileData, has three columns of data: time, distance, and height. Import
ProjectileData.xlsx into MATLAB. The distance variable represents measurements of the x
position (horizontal position) of the projectile over time and the height variable represents
measurements of the y-position (vertical position) of the projectile over time.
The equations for the x and y positions of a projectile launched at an angle of \theta (degrees) with an
initial velocity of V0(m/s) are:
a) Plot time on the x-axis and distance on the y-axis. Add axis labels (with units) and a
title to your plot. We know that the x-position of the projectile increases linearly with
time. So, use the curve fitting tool to fit a 1st order polynomial (line) to the distance
data. Display the equation for the fitted polynomial on your graph with 5 significant
digits. Submit through Moodle your .fig file as well as your script (.m or .mlx) for
automating the generation of the plot.
b) Plot time on the x-axis and height on the y-axis. Add axis labels (with units) and a title
to your plot. We know the height of the projectile follows a parabolic (2nd order) curve.
So use the curve fitting tool to fit a 2nd order polynomial (quadratic) to the height data.
Display the equation for the fitted polynomial on your graph with 5 significant digits.
Submit through Moodle your .fig file as well as your script (.m or .mlx) for automating the
generation of the plot.
c) Look at the numerical coefficient for the squared term in the fitted polynomial for the
height data. Theoretically, this coefficient should be equal to -1/2*g. How close is it?
Calculate the percent error using the following formula with -1/2*g as actual value:
Using good programming practices, create a script that allows for the inputting of the
estimated value (numerical coefficient for the squared term) then calculates and displays
the %error. Submit your solution using the Moodle Curve Fitting Homework submittal
link.
1
2
d) The numerical coefficient for the linear term in the fitted polynomial for height should
be approximately V0 sin(\theta ) and the numerical coefficient for the linear term in the fitted
polynomial for distance should be approximately V0 cos(\theta ).
V0 sin(\theta )=____________________
V0 cos(\theta )=____________________
\theta =______________________(include units)
V0=_____________________(include units)
Using good programming practices, create a script that allows for the inputting of the V0
sin(\theta ) and V0 cos(\theta ) values, and then calculates and displays the launch angle, \theta , and
initial velocity, V0. Submit your solution using the Moodle Curve Fitting Homework
submittal link.
Hint: Solve for launch angle by dividing (V0 sin(\theta )/ V0 cos(\theta )). This value is equal to
the tan(\theta ). Thus taking the arctan or tan-1 of the value will result launch angle. Using
the angle and value for V0 sin(\theta ) or V0 cos(\theta ), you can then calculate the initial velocity,
V0.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!