




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
A step-by-step tutorial on creating and customizing a Graphical User Interface (GUI) in MATLAB for ENGR 1110 students. It covers creating a new GUI, saving files, updating the layout, adding a button, and editing the code to make the button clear the plot. The tutorial also includes adding a standard MATLAB plot window toolbar and demonstrates the working GUI to the TA.
Typology: Exercises
1 / 8
This page cannot be seen from the preview
Don't miss anything!
MATLAB Graphical User Interface (GUI) Tutorial for ENGR 1110
You should see this figure window:
The MATLAB Editor should appear with myfirstgui.m loaded. You might also get a dialog box that looks like this:
Now drag the black square handle at the lower right of the layout grid and make the grid larger. Click in the white area where the axes1 text is displayed. Handles (little black squares) should appear on the axes. Drag the handles to make the axes smaller. This makes room for a new button we are going to add.
When edited, it should look like this in the editor window (may show pushbutton4 instead of pushbutton1):
set(hObject,'toolbar','figure');
This should be placed just before the line that reads:
guidata(hObject, handles);
The edited section of code should look like as shown below. The line we just added is at line 58 in my editor (your line number may vary slightly):