Word

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.
Download