CMPSC 200

【CMPSC 200】CMPSC 200 – Lab 3
Description
Objectives:

  1. Use MATLAB to perform engineering calculations.
  2. Apply scripts, functions, and local functions to an engineering problem.
    Description:
    You have a steel plate with thickness and side lengths & . It has holes of diameter drilled in a
    rectangular pattern with spacing , as shown below. In such a scenario it is important to know the final
    volume and surface area of the part. Volume is needed so that the weight can be predicted, while
    surface area is needed so that surface treatments can be planned.
    Deliverables:
    Based on a set of given information provided in a script, the student must:
    ? Define 2 local functions for the script.
    o To perform a unit conversion.
    o To determine the number of holes required based on the size of the plate, holes, and
    required spacing
    ? Define a single function that outputs the surface area and volume of the resulting metal sheet.
    dHole + space
    dHole + space
    Instructions:
  3. Open MATLAB and Canvas, download the required file for Lab 03, and place it in your working
    folder.
  4. Open the script and follow the instructions given in the comments.
  5. You should not use global variables in today’s lab.
  6. (8 pts) Be sure to replace the instructional comments with your own comments after you
    complete each step.
  7. (7 pts) Be sure to use good naming conventions for any variables you define.
  8. (5 pts) After you are finished and you have confirmed your results for the preset dimensions,
    change the values given for the sheet dimensions to reflect this sheet: Steel Sheet when it has
    holes drilled in it with a drill bit and the holes are spaced apart.
  9. When you are done, you should have the script that you were provided (heavily modified now)
    and the AreaVolume function that you created. Highlight both files in the MATLAB current folder
    window (you can select both by holding Ctrl when you click on them), then right-click and select
    “Create Zip File.” Name the zip file with LAB03_psu123.zip, replacing psu123 with your Penn
    State email ID#.
  10. Upload the zip file to Canvas.

    推荐阅读