Anda di halaman 1dari 13

# Individual

## • 13B: MATLAB Practical Exam

• 14A: Challenge Problems
Team:
• Due 13A IDP MATLAB Simulation
• Due 13LEAP IDP Prototype/Test 3
• 14B Design Expo Poster Session

LESSON 13A:
MATLAB REVIEW EXERCISES
Mary Fraley ENG1102: Engineering Modeling and Design
December 2, 2018 Michigan Technological University – Department of Engineering Fundamentals
MATLAB Practical Exam
13B Wed. Dec. 5 MEEM 120
 Time allotted will be 55 minutes
 Practice problems are on Canvas
 See coverage slide for MATLAB topics

 Testing times:
– L01: 6:00-7:00PM
– L02: 8:00-9:00PM

4
MATLAB Practical Exam Topics
You will be creating a function and a script file. Your tasks could include
the following:
2. Extract individual columns of data
3. Use while loop(s) to perform calculation(s) until a condition is reached
4. Use selection statements
5. Create vector(s)
6. Count occurrences (user-created function only)
7. Calculate a sum or average (user-created function only)
8. Find minimum or maximum values (user-created function only)
9. Report the results in formatted output statement (fprintf)
10.Create a properly labelled plot (using plot or plotyy)

## Practice Problem is available on Canvas.

Also look at your HW11B Rocket Launch
5
Final Exam
 Wednesday, Dec. 21, 5:30-7:30pm
 Dow 641
 Topics
– Spatial Visualization (obliques, orthographics, isometrics,
sections, drawing conventions, dimensioning)
– NX
– Working Drawings
– Hazard Analysis
– Flowcharts/MATLAB
– Design Project Process and Tools

6
IDP PowerPoint Deck
 Your PowerPoint deck should tell a full, continuous
 Will be used for your Design Project Expo Poster
 Go back through and update your slides
 Resurrection points possible
 Last slide
– List the project deliverables and slide numbers that
have been updated
– Hide last slide
Homework
Rocket Launch

9
Problem #2: Auto Open
Parachute Analysis

##  See Module for

instructions
.m file to 13A In-
Class Activity
 Sample output on
next slide

10
Another Example
Multiple Series on One Plot: plotyy
Placing multiple series on one plot can be useful if you have related plots that
have the same x-scale and values, but a different y-scale

## 1. Either create one plot using plotyy (see example below) or

2. Create two figures (use subplot)

x = 0:0.01:20;
y1 = 200*exp(-0.05*x).*sin(x);
y2 = 0.8*exp(-0.5*x).*sin(10*x);
[my_axes,series_1,series_2] = plotyy(x,y1,x,y2);
ylabel(my_axes(1),'Slow Decay'); %labels y1 axis
ylabel(my_axes(2),'Fast Decay'); %labels y2 axis
xlabel(my_axes(1),'Time');%labels x axis
title(my_axes(1),'Comparison of Decay Periods'); %title
set(series_1,'LineStyle','--','Color','r');%line style & color for series 1
set(series_2,'LineStyle',':','Color','b'); %line style & color for series 2

11
MATLAB Practice Problem #2 Output

12
 Try practice problems 1 and 3!

14
MATLAB Practice Problem #1
Output

15
MATLAB Practice Problem #3
Output

16
What’s Due?
ESP next class:
1. None

HOMEWORK
Monday Wednesday Friday
12/3 Week 13 12/5 12/7
IDP MATLAB MATLAB Practical Exam IDP Prototype/Test 3
Simulation
12/10 Week 14 12/12 12/14
Challenge Problems Design Expo Poster Session
Final Power Point Deck