ENGR112 HW2 Arrays Plotting.pdf - Week 2 Homework Name...

This preview shows page 1 - 5 out of 23 pages.

Week 2 Homework ENGR 112 Arrays and plotting Name: Haziel Habila Lab Time (ECampus write “ECampus”) : W 2:00 4:00 Names of people you worked with: none Websites you used: none Approximately how many hours did it take you to complete this assignment (to nearest whole number)? 3 By writing or typing your name below you affirm that all of the work contained herein is your own, and was not copied or copied and altered. Haziel Habila Note: Failure to sign this page will result in a 50-point penalty. Failure to list people you worked with may result in no grade for this homework. Failure to fill out hours approximation will result in a 10-point penalty. Turn .zip files to Canvas or your assignment will not be graded
Week 2 Homework ENGR 112 Arrays and plotting Learning Objectives: You should accomplish the following: Understand how to create arrays, calculate with them, and extract data from them. Plot the results of calculations. Be able to split up plots into multiple windows Plot multiple things in the same window with different colors and attributes. Homework Guidelines: 1) Use example scripts from online for help plotting and vectors. 2) Save scripts as “HW2Script1.m” for problem 1, “HW2Script2.m” for problem 2, etc. Specific Coding Notes: Plotting Label axes (with units when known), use titles, and use legend when plotting more than one thing on a graph. Example: NO 😊 YES 😊 Warnings and Errors You may see orange and red bars on the right-hand side of the editor. Orange bars are warnings and red bars are errors. Hovering with the cursor over a par will show you the problem. Example:
Week 2 Homework ENGR 112 Arrays and plotting Grading Checkpoints Criteria Component No Yes [30%] Comments and Pseudocode Declared units on all variables? English description of problem at top? Comments outlining your steps? [20%] Output formatting Used fprintf() to make complete sentences (when required)? Correct units on answers? Correct number of decimal places? Proper labels on graphs/plots? [50%] Functionality Script computes/plots correct value(s)? Did you use the correct ranges for input variables?
Week 2 Homework ENGR 112 Arrays and plotting Problem 1 a) Plot the following mathematical function in the domain -10 ≤ t ≤ 7 in increments of 0.004. Assume that the x-axis is time measured in seconds, and the y-axis is distance measured in meters. Print the minimum and maximum values of y for that range of ts, and the t- values that produce the minimum and maximum values using the proper matlab functions. Label the axes with time in seconds (t) and distance in meters (y). a. Hint: Look up the different versions of the function min/max. b) Check the minimum value against the analytic solution (hint: minimum and maximum values occur when the derivative is zero).

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture