Modeling and Simulation using Matlab In this project, you are provided a file (data.dat) that includes force and displacement data. Using this file/data, write a script that only displays in the command window the maximum force (Newton [N]) and the calculated stiffness [ N//mm ]. The calculated stiffness is based on an interactive process with the user. The script should plot force vs. displacement (with all the appropriate labels) and the user should be able to, interactively, chose the lower and upper limits from which the stiffness will be calculated. These lower and upper limits can be placed anywhere in the graph by the user. It is very important to note that these lower and upper limits will be the limits from which the data in between will be "isolated" to calculate the stiffness. The stiffness, slope, is not calculated based on the two single values selected by the user. What does this mean? Well, figures 1 below show the total force vs. displacement data from which the user will select the lower and upper limits and the calculated stiffness from the selected bounds. Figures 2 below show the isolated data, in between the lower and upper limits, from which the stiffness is calculated. In this case, the data is mostly linear, so the red line overlaps covering the entire data. Figures 3 show a different scenario.
Only create a process that will create plots similar to Figure 1.
Hint: You can use commands such as "ginput", "find", and "getCursorInfo" to get data point values and information.
The stiffness curve (line) needs to be plotted on top of the original data in red. The figure should display the Stiffness ( \( \mathrm{N} / \mathrm{mm} \) ) and the value in red.
Only create a process that will create plots similar to Figure 1.
Hint: You can use commands such as "ginput", "find", and "getCursorInfo" to get data point values and information.