An interactive introduction to MATLAB

(Jeff_L) #1
C.3scripts and functions 85

Table 10: Coefficients for the cubic equation for the heat capacity of gases
gas a b c d
SO 2 38.91 3.904× 10 −^2 −3.205× 10 −^5 8.606× 10 −^9
SO 3 48.50 9.188× 10 −^2 −8.540× 10 −^5 32.40× 10 −^9
O 2 29.10 1.158× 10 −^2 −0.6076× 10 −^5 1.311× 10 −^9
N 2 29.00 0.220× 10 −^2 −0.5723× 10 −^5 −2.871× 10 −^9


  1. Functions
    Create a function file that calculates the trajectory of a projectile. The
    inputs to the function should be the initial velocity and the angle at
    which the projectile is fired. The outputs from the function should be the
    maximum height and distance. In addition, the function should generate
    a plot of the trajectory. Use the function to calculate the trajectory of a
    projectile that is fired at a velocity of230 m/sat an angle of 39 ◦.


x

y

dmax

v 0

θ

hmax

Figure 26: Motion of a projectile
Free download pdf