blob: c0e65dff7e1fc72cbc5aeec107c80a44fdc46e7a (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
//Example 16.2
k=50;//Force constant of spring (N/m)
x=0.150;//Spring deformation (m)
PE_el=1/2*k*x^2;//Elastic potential energy (J)
printf('a.Energy stored in the spring = %0.3f J',PE_el)
KE_f=PE_el;//Kinetic energy (J)
m=2*10^-3;//Mass of projectile (kg)
v=sqrt(2*KE_f/m);//Speed of projectile (J/kg)^(1/2) or (m/s)
printf('\nb.Speed of the projectile = %0.1f m/s',v)
//Openstax - College Physics
//Download for free at http://cnx.org/content/col11406/latest
|