advertisement

ENGR 1181 | MATLAB 14: 2D Plots MAT_14D_2D_Plots_Assignment Follow the format that you’ve been doing for previous problems. ο· Do the entire problem in one script file. ο· Your script file should include comment statements to help organize your script file. ο· Make sure the Command Window displays your name, the assignment name, and your group number. ο· Submit based on your instructor’s guidelines. Background Biomechanical engineers are constantly examining the forces that are exerted on one’s body by everyday activities as well as accidents, injuries, etc. When walking or running, there is a force exerted on your body due to the impact with the ground. There are polynomial equations to can be used to approximate these forces. Define You are a biomechanical engineer and you wish to graph the force exerted by the ground (N) vs. time (s) for a person running and walking. You have the following equations for the force (N) due to one step of a walk, πΉπ and one step of a run, πΉπ : πΉπ (π‘) = π΄π‘ 4 + π΅π‘ 3 + πΆπ‘ 2 + π·π‘ πΉπ (π‘) = πΈπ‘ 2 + πΊπ‘ Where: π΄ = -125000 π΅ = 177330 πΆ = -85000 π· = 15600 πΈ = -172560 πΊ = 38600 You must use repetition structures (loops) to create a vector that will then be graphed. Instructions Represent ο· Consider creating a flowchart, algorithm, or pseudocode to represent your solution process. Plan ο· Create a script file ο· Consider outlining the steps your program will take by adding comment statements to your script file based on your flowchart, algorithm or pseudocode. Implement ο· In the script file, perform the following tasks: ο· Part 1: ο Use a loop to create a vector for πΉπ and a vector for time for the walk. ο§ The time vector will range from 0 s to 0.7 s for the walk. ο§ Choose an appropriate step size for the vectors. ο ο ο Use the plot() command to plot πΉπ vs. time. Use commands in the script file to include proper title and axis labels. Print the script file and figure output to a pdf. Combine pdfs and submit to the Carmen Dropbox. Then, continue on to Part 2. ο· Part 2: ο Use a loop to create a vector for πΉπ and a vector for time. ο§ The time vector will range from 0 s to 0.22 s for the run. ο§ Choose an appropriate step size for the vectors. ο Use the command figure; to create a new figure for the next plot. ο Use the plot() command to plot πΉπ vs. time and πΉπ vs. time on the same figure. Use different line types to distinguish between the two lines. Remember that if you are printing in black and white, different colored lines will not help distinguish between lines. ο Use commands in the script file to include proper title, axis labels, and legend. Evaluate ο· Perform a hand calculation to verify a couple points in each equation. Document ο· Print (paper or pdf depending on instructor preference) the final version of your script file. ο· Print (paper or pdf depending on instructor preference) the figure produced by the script file. ο· Print (paper or pdf depending on instructor preference) the calculation for the evaluate step. ο· If paper: Staple the planning documentation, script file, figure output, and verification together and turn it in. ο· If pdf: Combine pdf files together and submit to Carmen Dropbox.