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, :

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 0s to 0.22s 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.