Question: 4. The force required to compress a linear spring is given by the equation: Fkx where Fis the force in newtons and k is the

 4. The force required to compress a linear spring is given

4. The force required to compress a linear spring is given by the equation: Fkx where Fis the force in newtons and k is the spring constant in newtons per meter. The potential energy stored in the compressed spring is given by the equation: E- kx2/2 where E is the energy in joules. (See figure below). Equilibrium position Stretched position x = 0 SPE = 2 kx02 Write an executable script file (m-file) that takes no inputs and returns the displacement and stored energy of a spring system after prompting the user for the 1) input forces (in N) on the spring and 2) the spring constant (in N/m). Use plenty of comments to annotate your code and include your name in the m-file. (Name your mfilenergy 2018.m)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!