- #1
cphill29
- 16
- 1
Homework Statement
I have to write a MATLAB script that calculates the horizontal distance of a projectile fired from a cannon set at 45 degrees by a compressed spring. I know that the spring constant is 6 lb/in, the unstretched length of the spring is 1 foot, the mass of the projectile is 0.1 lb, and the projectile has to land 10, 12, and 14 feet away. How much spring compression is needed to hit these three lengths?
Homework Equations
KE+PE=KE+PE
The Attempt at a Solution
I really have no idea how to even begin. I have this so far
>>g=-32.2
>>m=0.1
>>k=6
>>d=1
I think I need some kind of loop? I really need some help here.