matlab-guide

Matlab Calling 'Import Data' with GUI Button

不打扰是莪最后的温柔 提交于 2019-12-10 10:20:21
问题 I'm working in a GUI in Matlab R2014b that uses some data from a txt file, so i want to call the 'Import Data' window to permit the user select the data from a file when pushing a button. Is there a way to do this? 回答1: The function uiimport is used for importing data interactively. This seems to be what gets called by Matlab's toolbar's "import data" button. Excerpting from the documenatation, uiimport opens a dialog to interactively load data from a file or the clipboard. MATLAB® displays a

Function that executes on GUI closing in matlab

冷暖自知 提交于 2019-12-09 18:16:50
问题 I am creating a GUI in matlab using guide. It's non-blocking (not calling uiwait ). When the gui window is closed, I would like to execute some clean up code. Is there an gui_ClosingFcn callback I should define in analogy to the gui_OpeningFcn template that guide creates for me? 回答1: Figure windows have a 'DeleteFcn' property, which defines a callback function that will run when the window is closed/deleted. You could potentially use that to do your clean-up. 回答2: Figure windows have a

Assign a value to a static text in GUI MATLAB

霸气de小男生 提交于 2019-12-09 14:58:06
问题 How can I assign a value to a static text in a MATLAB GUI? 回答1: Double click on your text in guide to open the property editor, then edit the 'String' property. You can also set the 'Tag' property so you can edit it while your GUI is running. If you set your tag to mytext , you can change the static text to 'MyString' with the following line: set(handles.mytext,'String','MyString') 回答2: So that didn't work for me. However, after setting the tag as above the following would work: set(findobj(

How might I build a full UI for a piece of Matlab numerical code? [closed]

时光总嘲笑我的痴心妄想 提交于 2019-12-09 00:19:24
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 8 years ago . I am researching building a full UI for a piece of Matlab numerical code. I can of course port the code to another platform and build

How to match histogram of set of medical images?

ε祈祈猫儿з 提交于 2019-12-08 14:11:01
问题 I have medical images of 100 patients (100 stacks of MRIs) and I want to do histogram matching on them using this Matlab function B = imhistmatch(A,ref) How can I choose ref patient MRI (as reference volume)? since the number of slices between patients varies, how can I perform histogram matching? I am hoping someone here can recommend a solution that explains the process in a way that I can use or share any code. Thanks 来源: https://stackoverflow.com/questions/43741287/how-to-match-histogram

how to pass value among functions in MATLAB GUI?

筅森魡賤 提交于 2019-12-08 12:46:13
问题 I'm trying to convert an image file into a binary file, where I'm using 2 buttons in Matlab GUI. the first button it to browse the files then shows the file name on a static text, and the second button for saving it as a CSV file, and this is my code function varargout = signatureGUI(varargin) % Begin initialization code - DO NOT EDIT gui_Singleton = 1; gui_State = struct('gui_Name', mfilename, ... 'gui_Singleton', gui_Singleton, ... 'gui_OpeningFcn', @signatureGUI_OpeningFcn, ... 'gui

Storing workspace variable in GUI for use by other push buttons. MATLAB GUI

三世轮回 提交于 2019-12-08 10:19:32
问题 I have just started making a basic GUI with GUIDE, so far I have one push button that I am using to call a .m file I wrote earlier called sortData.m When run outside of the GUI, sortData.m puts a matrix called "merge" into the workspace, but when I run sortData.m inside the GUI nothing happens. I need "merge" to get stored somewhere so that my next push button can use it to output figures... how can this be done? Thanks % --- Executes on button press in pushbutton1. function pushbutton1

Uitable over whole window width

回眸只為那壹抹淺笑 提交于 2019-12-08 08:56:13
问题 I would like to programmatically (or in GUIDE) fix the matlab-uitable to be the whole width of the panel on initialisation. How can I do this? All I've managed is to change the size in pixels of single columns. I would like the uitable to be 100% the width of the page at that time. When my window is in minimized form the GUI looks fine, but when I maximize it, the uitable is only about half the width of the page. (The uitable's height is not that of the whole panel though, around 1/2 of the

Matlab GUI using GUIDE : Want to dynamically update graphs

[亡魂溺海] 提交于 2019-12-06 23:07:07
问题 I've written a Matlab script that reads in data using a virtual COMM port in real-time . I've done a significant amount of signal processing in an mfile. Next, I felt the need to have a compact GUI that displays the information as summary. I only recently started digging and reading more of Matlab's built-in GUI tool, GUIDE. I've followed a few tutorials and am successfully able to get my graphs to display on my GUI after a button-press . However, I want the GUI to update in real-time . My

How to get point of a figure (using callbacks in GUI) when the point is inside a region that previously has been “patched”?

☆樱花仙子☆ 提交于 2019-12-06 19:17:24
I am using patch in order to draw inside an ellipse into a figure I have created in gui environment. Normally, I get figures' points (coordinates) by clicking (using callback functions). It works properly when the point I want to grab is not inside an ellipse that I have previously plotted (applying patch ). What should I do after applying patch in order to be able to get a point that is inside some ellipse after I have drawn it? Thanks a lot! Here's a way to solve your problem: First we draw a point followed by a patch that "covers" it. In this example the patch is transparent, and still the