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 : 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 yposition 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 Vms are:
a Plot time on the xaxis and distance on the yaxis. Add axis labels with units and a
title to your plot. We know that the xposition of the projectile increases linearly with
time. So use the curve fitting tool to fit a st order polynomial line to the distance
data. Display the equation for the fitted polynomial on your graph with 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 xaxis and height on the yaxis. Add axis labels with units and a title
to your plot. We know the height of the projectile follows a parabolic nd order curve.
So use the curve fitting tool to fit a nd order polynomial quadratic to the height data.
Display the equation for the fitted polynomial on your graph with 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 g How close is it
Calculate the percent error using the following formula with 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.
d The numerical coefficient for the linear term in the fitted polynomial for height should
be approximately V sintheta and the numerical coefficient for the linear term in the fitted
polynomial for distance should be approximately V costheta
V sintheta
V costheta
theta include units
Vinclude units
Using good programming practices, create a script that allows for the inputting of the V
sintheta and V costheta values, and then calculates and displays the launch angle, theta and
initial velocity, V Submit your solution using the Moodle Curve Fitting Homework
submittal link.
Hint: Solve for launch angle by dividing V sintheta V costheta This value is equal to
the tantheta Thus taking the arctan or tan of the value will result launch angle. Using
the angle and value for V sintheta or V costheta you can then calculate the initial velocity,
V
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
