Assignment 7 The GUI masspring m The GUI masspring m is a Graphical User Interface written in MATLAB It is useful for understanding how the solution of the mass spring problem changes when physical parameters such as the mass m the friction coefficient c the spring constant k the initial conditions y 0 and y 0 are varied After download the GUI is launched in the MATLAB Command Window by entering masspring The parameters can be changed in the edit boxes at the top of the window The solve button then solves the problem The solution is displayed in the lower left part of the window If the parameters are changed and the problem solved again the axes in the display are likely to change To keep the previous axes press the hold on button To release the axes press the button again now labeled hold off The GUI has two nice features Parameters can be continuously changed within a predefined range To select which parameter to change select the appropriate item in the menu Then use the slider by continuously clicking on one of the directional arrows left or right or simply moving the slider left or right while pressing the left mouse button The solution is then continuously updated in the graph area It is recommended to set the hold button for this feature in order to better understand how changes in the parameter affect the solution The actual physical movement of the mass can be observed for a given setting of the parameters by pressing the play button At the same time a red marker moves on the trajectory displayed in the graph area on the left to indicate the point on the solution curve corresponding to the current elongation of the spring on the right The current time is also displayed The movement can be paused using the button Finally the button resets parameter values to default values while the button exits the GUI Exercises 1 Let m 1 c 0 k 4 y 0 0 1 meter and y 0 0 i e the mass is initially stretched downward 10cms and released Answer the following questions related to Exercise 1 a What is the period of the motion Answer this question first graphically by reading the period from the graph and then analytically by finding the period using o b When will the mass spring system come to rest Why c What is the amplitude of the oscillations for y d How does the size of the mass m and the stiffness k of the spring affect the motion Your answer should be supported graphically by changing the values of m and k and analytically by a theoretical analysis on how o and therefore the period of the oscillation is related to m and k 2 Let m 1 c 1 k 4 y 0 0 1 meter and y 0 0 i e the mass is initially stretched downward 10cms and released Answer the following questions related to Exercise 2 a How does the size of c affect the motion Run the GUI for different values of c to support your answer b Determine analytically the smallest critical value of c such that no oscillation appears in the solution Demonstrate your result numerically by generating appropriate pictures
View Full Document