Questions tagged [matlab-gui]

This tag deals with questions about adding, removing or modifying interactive controls in MATLAB figures. This tag should be used primarily when adding or creating GUIs **programmatically**. For questions about either of MATLAB's GUI-building tools, consider tagging with [tag:matlab-guide] or [tag:matlab-app-designer] when applicable.

MATLAB GUIs (also known as graphical user interfaces or UIs) are front ends that provide point-and-click control to MATLAB programs. GUIs eliminate the need to type commands in order to run an application, and are typically used to automate some task or calculation. The GUI typically contains controls such as menus, toolbars, buttons, and sliders.

Sources:

  1. Create Apps with Graphical User Interfaces in MATLAB.
108 questions
12
votes
1 answer

How to add a "tutorial message div" to figures?

After installing R2018b, the first figure I opened contained an interesting message (shown in blue): The reason it's interesting is because it contains features like text wrapping, transparency, the fact that the image maintains a constant width…
Dev-iL
  • 23,742
  • 7
  • 57
  • 99
7
votes
1 answer

Making a dialog where the user can choose either a file or a folder

In MATLAB, there's a function that prompts the user to choose one or more files - uigetfile, and there's another function which allows the user to choose a folder - uigetdir. I would like to provide the user an ability to choose either a file or a…
Dev-iL
  • 23,742
  • 7
  • 57
  • 99
7
votes
2 answers

Determine MATLAB's Monitor in a multiple monitor configuration

I move around from a company site to another a lot. At any given day, I might have just my laptop or as many as four monitors. With multiple monitors, I don't know which monitor I will choose to use for MATLAB main GUI (the main GUI launched when…
Eric
  • 409
  • 2
  • 15
5
votes
1 answer

How can I implement the deprecated full crosshair pointer functionality in MATLAB?

I'm trying to replace the pointer on a chart plot with a full crosshair (that is, a set of 2 perpendicular lines that stretch to the edges of the plot vertically and horizontally and follow the mouse cursor). Years ago, I was able to accomplish this…
Alarik
  • 301
  • 1
  • 8
4
votes
2 answers

How to customize the background of an App Designer figure?

I'd like to attach a logo or change the whole background of an App Designer uifigure. How can this be done?
3
votes
2 answers

How to close all graphs in GUI without closing the GUI itself?

I am using Matlab Guide to make a user interface. In this interface I run .m files which plots various graphs. After analysis, I want to close the graphs without closing the GUI. If I use close all; all the graphs including the GUI itself closes.…
H.K
  • 231
  • 1
  • 2
  • 15
2
votes
1 answer

Close uialert figure by button click

Based on a MATLAB example, I added a close command in order to close the uifigure after pressing the OK button. However, in its current state the figure is closed automatically, rather than on the button click. How can I alter the below to have the…
JohnSal
  • 378
  • 3
  • 11
2
votes
1 answer

How to use togglebutton to turn labels in scatterplot on/off

I tried to create a scatter plot with labels for each point: Now I would like to give the user of the code the possibility to turn the labels on and off. So far my code looks like this: x = rand(1,100); y = rand(1,100); pointsize = 30; idx =…
Ferde
  • 25
  • 6
2
votes
1 answer

Matlab GUI not showing line plot graph data

I'm working with my Matlab GUI file to play video and plot the mean value from the color channel (RGB). It has 2 axes, the first one for the video player and second axis for the mean graph, but the second axis is not showing any data, it just…
Mr. Nash
  • 23
  • 1
  • 3
2
votes
1 answer

Warning: Error updating Text

MATLAB gives me a warning as following: Warning: Error updating Text. Character vector must have valid interpreter syntax: $\Theta(s) = 9.24\cdot 10^{04 }\cdot \frac{s + 0}{s^{4} + 140s^{3} + 2.35\cdot 10^{03s}^{2} + 9.24\cdot 10^{04s} + …
David Ling
  • 93
  • 10
2
votes
1 answer

Error using patch in MATLAB

I am creating a drag box to zoom in that uses the patch function. I get the following error when I drag: Error using patch Not enough input arguments. Error in boxReady (line 31) guiele.dragBox = patch(guiele.ResponsePlotAxis, ... …
David Ling
  • 93
  • 10
2
votes
2 answers

How to import a table/structure to a GUI with check box for each row, then export the select list into MATLAB?

I'm new with MATLAB-GUI. I watch a couple of video and I understand how check box are working (the base) but it seems that you have to pre-defined where and how many check box you will have. I have a table or structure in MATLAB (import from CSV…
MC_B
  • 31
  • 4
2
votes
1 answer

How to display desired image in MATLAB GUI?

I have a GUI as shown below: And I would like to apply Otsu threshold on the image displayed after contrast enhancement. But whenever I pressed the apply button for Otsu threshold,the Otsu threshold will be applied on the original image instead of…
jolene
  • 29
  • 6
2
votes
2 answers

Slider disappears from GUI after being used

I try to make a MATLAB GUI programmatically and face the problem that my slider disappears after using it. I isolated the problem to keep the code short. In this GUI I want to refresh the plotmatrix each time the slider is used (ignore the fact that…
dcts
  • 1,479
  • 15
  • 34
2
votes
1 answer

Greek letters in uimenu label

I'm trying to have a uimenu whose 'Label' contains and displays both roman and greek letters. I've tried : uimenu(h,'Label','test with σ') % displays 'test with ?' uimenu(h,'Label','test with \sigma') % displays 'test…
1
2 3 4 5 6 7 8