【CMPSC 200】CMPSC 200 – Lab 3
Description
Objectives:
- Use MATLAB to perform engineering calculations.
- 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: - Open MATLAB and Canvas, download the required file for Lab 03, and place it in your working
folder. - Open the script and follow the instructions given in the comments.
- You should not use global variables in today’s lab.
- (8 pts) Be sure to replace the instructional comments with your own comments after you
complete each step. - (7 pts) Be sure to use good naming conventions for any variables you define.
- (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. - 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#. - Upload the zip file to Canvas.
推荐阅读
- Java|合格的Java工程师要掌握哪些知识点
- java|深度理解类与对象
- java|IDEA优秀插件之codeMaker
- DATA3888 (2022): Assignment 1
- CPSC 221 PrairieLearn
- CSC 3002问题解答
- CIS 28-061
- 编辑器|中国低代码行业竞争格局(BAT、用友、金蝶纷纷入局)
- java|【开发工具】Windows远程桌面连接