Professional Documents
Culture Documents
ES2D7 System and Software Engineering Principles - Creating Apps
ES2D7 System and Software Engineering Principles - Creating Apps
1
ES2D7 - Creating Apps
1 Introduction
The objective of these activities is to create a Matlab app and understand
how this is implemented using a class.
If you have Matlab 2019 (or later) then select ‘Interactive tutorial’ and
follow the instructions and run the app. Otherwise please see the video on
moodle which shows you how to construct an app.
Once you have run the app, take a look at the code and try to understand
how it has been implemented as a class.
Figure 1:
Page 2
ES2D7 - Creating Apps
Figure 2:
Figure 3:
• Draw a SysML block diagram (or UML class diagram) for the tutorial
app.
Page 3
ES2D7 - Creating Apps
Figure 4:
Page 4
ES2D7 - Creating Apps
• When the user clicks a draw button, the graph y = xt shall be drawn
Some hints:
• When plotting to a figure on the app, you need to tell the plot com-
mand which axis should be plotted to. Instead of plot(t,sin(t)),
you need to use: plot(app.UIAxes, t, sin(t)), where app.UIAxes
is the name of the axis.
Page 5
ES2D7 - Creating Apps
• The input to the system is the force f (t) and the output of the system
is the displacement of the mass x(t) in metres.
• Upon request, the user should be able to see a step response displayed
within the app.
• The user should be able to enter the following parameters into the App:
– Mass in kg
– Spring Constant in N m-1
– Damper co-efficient N s m-1
– Height of step input in N.
Page 6