The potential energy stored in a spring is kx2/2, where k is the spring constant and x is the compression in the spring. The force required to compress the spring is kx. The following table gives the data for five springs:
|
Spring
|
1
|
2
|
3
|
4
|
5
|
Force (N)
Spring constant k (N/m)
|
11
|
7
|
8
|
10
|
9
|
1000
|
600
|
900
|
1300
|
700
|
Use MATLAB to find (a) the compression x in each spring and (b) the potential energy stored in each spring.