matlab-guide

save GUI figure in matlab

北慕城南 提交于 2019-12-12 04:37:36
问题 let us consider following program for graphical user interface function varargout = quadratic(varargin) % QUADRATIC MATLAB code for quadratic.fig % QUADRATIC, by itself, creates a new QUADRATIC or raises the existing % singleton*. % % H = QUADRATIC returns the handle to a new QUADRATIC or the handle to % the existing singleton*. % % QUADRATIC('CALLBACK',hObject,eventData,handles,...) calls the local % function named CALLBACK in QUADRATIC.M with the given input arguments. % % QUADRATIC(

Make the slider as a progress bar in matlab GUIDE

会有一股神秘感。 提交于 2019-12-12 04:27:01
问题 I am having hard time to make slider to behave as a progress bar. I have two push buttons. One accepts the starting value from a text editor(User Input) and other start the progress of the loop. Then I have got a slider, which I am trying to move as the function loop changes 'i' value(Update along/show progress). This is my code. function varargout = myfig(varargin) % Begin initialization code - DO NOT EDIT gui_Singleton = 1; gui_State = struct('gui_Name', mfilename, ... 'gui_Singleton', gui

Transfer the data from pushbutton object to an external function[Considering the function is running]

好久不见. 提交于 2019-12-12 04:04:45
问题 I have matlab GUI like this, Which has a start pushbutton, update pushbutton and an edit text box. function varargout = Main_function(varargin) % Begin initialization code - DO NOT EDIT gui_Singleton = 1; gui_State = struct('gui_Name', mfilename, ... 'gui_Singleton', gui_Singleton, ... 'gui_OpeningFcn', @Main_function_OpeningFcn, ... 'gui_OutputFcn', @Main_function_OutputFcn, ... 'gui_LayoutFcn', [] , ... 'gui_Callback', []); if nargin && ischar(varargin{1}) gui_State.gui_Callback = str2func

Matlab GUI Callback Start and Completion

故事扮演 提交于 2019-12-12 03:37:36
问题 Is there a general purpose way to determine when a Matlab GUI callback function begins and then has returned to the dispatcher? I want to lock out user interaction while callbacks are running to completion and also show busy status while callbacks are running. Is there a dispatcher accessible where I can insert this code, or do I have to put it into every callback function. I am aware of the modal waitbar but I want to avoid using that as much as possible. (They can't be killed gracefully.)

How to make a function non-blocking? Dynamic plotting in Matlab GUI

女生的网名这么多〃 提交于 2019-12-12 03:36:27
问题 It's been some time since using Matlab and I've never used it for any GUI creation until now. My goal is to have a button which I can press, and then have the results plotted as they are calculated. The button should toggle between 'Start' and 'Stop' depending on what is happening. These results are collected for several iterations and each iteration gives another data point. My solution was to pass the axes to the function doing the calculations, which can then plot to the axes. This works,

GUIData not updating properly

99封情书 提交于 2019-12-12 03:19:24
问题 I have a GUI in MATLAB which contains a timer. I want every time the timer is called to increment an index by one, and store it in the guidata. I would like functionality to go backwards if needed, so just using the TasksExecuted field would not work. My problem is that the index simply does not increment. This is the declaration of the timer handles.index= 1 ; handles.timer = timer(... 'ExecutionMode', 'fixedRate', ... % Run timer repeatedly 'Period', 1, ... % Initial period is 1 sec.

Function works only in Debug Mode MATLAB GUI

醉酒当歌 提交于 2019-12-12 02:44:14
问题 I'm trying to create a calendar using MATLAB GUI. I found this tutorial and created calendar: com.mathworks.mwswing.MJUtilities.initJIDE; % Put calendar to my figure jPanel = com.jidesoft.combobox.DateChooserPanel; [hPanel,hContainer] = javacomponent(jPanel,[500,130,200,200],gcf); set(handles.hPanel, 'MousePressedCallback', ... @(src, evnt)CellSelectionCallback(src, evnt, handles)); set(handles.hPanel, 'KeyPressedCallback', ... @(src, evnt)CellSelectionCallback(src, evnt, handles)); Also I

Checking For Proper Input of `Edit Text` String

不想你离开。 提交于 2019-12-12 02:16:13
问题 I have a GUIDE GUI where I ask the user to enter in their name. It should execute an error dialog if they enter numerical characters, a mix of string and numerical characters, or a blank box. The issue is that when I enter in numbers or a mix of string and numerical characters, then it is outputting Error Code II (1st elseif statement) instead of Error Code III (entering in numbers only) or Error Code IV (entering numbers and strings). Input would be greatly appreciated. Here's essentially

plot in matlab with timer on x axis

爱⌒轻易说出口 提交于 2019-12-12 02:14:43
问题 I have a Matlab code which plots the variable value against the loop iterations. I have considered random values as variable value just for this example. function varargout = myplot(varargin) gui_Singleton = 1; gui_State = struct('gui_Name', mfilename, ... 'gui_Singleton', gui_Singleton, ... 'gui_OpeningFcn', @myplot_OpeningFcn, ... 'gui_OutputFcn', @myplot_OutputFcn, ... 'gui_LayoutFcn', [] , ... 'gui_Callback', []); if nargin && ischar(varargin{1}) gui_State.gui_Callback = str2func(varargin

One function for multiple pushbuttons in matlab

一世执手 提交于 2019-12-12 02:07:49
问题 I was thinking of setting one function for multiple pushbuttons, They all do the same thing, but it has a different defining value. This is so that when one pushbutton is activated it does not get mixed up with the other pushbutton of the same function 回答1: See the documentation for callbacks. Callbacks accept two input arguments by default: the handle of the object that invoked the function and a structure of event data from the object, which may or may not be empty. You can use the String