Fall 2017 MEGR 4350: Dynamic Systems Laboratory 0 Exercise: Matlab and Simulink
Fall 2017 MEGR 4350: Dynamic Systems Laboratory 0 Exercise: Matlab and Simulink
Fall 2017 MEGR 4350: Dynamic Systems Laboratory 0 Exercise: Matlab and Simulink
Laboratory 0 Exercise
Matlab and Simulink
This is an individual assignment. All results (.m files, plots, simulink code, etc.) must be
presented in your report. The report is due 9/28/2017 via Canvas upload. No late reports
will be accepted unless for a pre-approved reason.
Please read the matlab tutorial and Simulink tutorial documents first, then work on these
exercises. These exercises provide you a chance to practice basic MATLAB and Simulink
commands and functions. Your results from this exercise have to be typed and neatly
presented in the report. This is an individual exercise so each student has to turn in his/her
own report. Note that for this lab you do not need to follow the formal written report
format. You can simply answer the questions with the appropriate code attached.
I. MATLAB
Create a .m file to calculate and plot the following functions from x= 0 to x= 20 with an
interval of 0.1:
= (2 + 4),
and = 2 (2 + 4).
Copy and paste your commands in the .m-file and the plots in your report. Show all the
labels and ranges in the axes. Can you put both plots in one figure?
II. Simulink
Modify the Simulink model we have in the Simulink tutorial including an f(t) term. The
equation is
x 0.5x 2x f t .
The input function f(t) is a step function with an amplitude= 1, and a step time = 1. Show
your Simulink model and plot the time response of this system in your report. Assume
zero initial conditions for x and .
Hint: Wire your desired input into the sum block. You will first need to add another (+)
plus sign into your sum block before wiring it.