MATLAB Creating Graphical User Interfaces

(ff) #1

(^1) Drag an Axes component from the Component Library onto the canvas.
(^2) Drag a Slider component from the Component Library onto the canvas. Place it
below the axes, as in the preceding image.
(^3) Replace the slider label text. Double-click the label and replace the word Slider
with Amplitude.
(^4) Above the canvas, click Code View to edit the code. (Notice that you can switch back
to edit your layout by clicking Design View.)
(^5) In the code view, add a callback function that executes MATLAB commands whenever
the user moves the slider. Right-click app.AmplitudeSlider in the Component
Browser. Then select Callbacks > Add ValueChangedFcn callback in the context
menu. App Designer creates a callback function and places the cursor in the body of
that function.
Create and Run a Simple App Using App Designer

Free download pdf