matlab-guide

Pass data between gui's matlab

半腔热情 提交于 2019-12-25 02:39:32
问题 I have two gui's one is main gui and other is sub gui. In opening function of main gui i used open('subgui.fig'); to open sub gui. Main consists of 5 edit box and one pushbutton. After pressing pushbutton the data in those 5 edit boxes should be passed to sub gui and main gui should close. Please any one help me to do this. 回答1: Let us take a simple case of one editbox and one pusbutton in main GUI and one editbox in sub GUI that will get value from the editbox in main GUI. One can easily

Cannot launch MATLAB guis (GUIDE) on scientific linux with jre 1.7.0_05

吃可爱长大的小学妹 提交于 2019-12-25 02:22:35
问题 Problem: GUIDE guis are missing their usual features (drop-down, push-buttons, etc). They just appear as empty windows with borders delineating where the different buttons used to be. The issue appears to be related to the jre version I am using. I don't know how to proceed. Here's the environment variables matlab is using. /usr/java/default points to the root directory of jre_1.7.0_05 contain bin, lib etc. ------------------------------------------------------------------------ -> (

Handles variable in GUIDE is not updating

戏子无情 提交于 2019-12-24 20:36:51
问题 I have a GUI created using MATLAB GUIDE. I am trying to return a value from the GUI. Here are the relevant parts of the code (complete code can be found here): function varargout = test(varargin) % --- Outputs from this function are returned to the command line. function varargout = test_OutputFcn(hObject, eventdata, handles) % Get default command line output from handles structure varargout{1} = handles.output; varargout{2} = handles.test; % --- Executes on button press in pushbutton1.

Getting snapshot from webcam in Matlab

让人想犯罪 __ 提交于 2019-12-24 16:08:06
问题 I have created a simple GUI to preview webcam stream and to get snapshot from it. For this I have created on axes to show video, one push button(pushbutton1) to start preview, one push button(pushbutton2) to get snapshot. Following is the code for these two push buttons. function pushbutton1_Callback(hObject, eventdata, handles) % hObject handle to pushbutton1 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see

Creating a transparent text box in MATLAB GUI using GUIDE

巧了我就是萌 提交于 2019-12-24 07:18:33
问题 In a MATLAB GUI I have a picture in the background (created on axes) and over it I would like to have text. I put a static text box but I need it to be transparent. Can I do it using GUIDE? 回答1: You can't use guide to do this, since the text objects are actually uicontrols. Try adding the text using the text function in your code instead. You may have to trial-and-error it in to the right location. 来源: https://stackoverflow.com/questions/12604633/creating-a-transparent-text-box-in-matlab-gui

Creating a transparent text box in MATLAB GUI using GUIDE

人走茶凉 提交于 2019-12-24 07:18:14
问题 In a MATLAB GUI I have a picture in the background (created on axes) and over it I would like to have text. I put a static text box but I need it to be transparent. Can I do it using GUIDE? 回答1: You can't use guide to do this, since the text objects are actually uicontrols. Try adding the text using the text function in your code instead. You may have to trial-and-error it in to the right location. 来源: https://stackoverflow.com/questions/12604633/creating-a-transparent-text-box-in-matlab-gui

Dynamic grid of images in MATLAB

断了今生、忘了曾经 提交于 2019-12-24 06:58:30
问题 I'm working on creating a GUI in matlab using GUIDE. However, i'm not exactly sure how to do the following, and was looking for some tips/advice. Problem I want to open a directory and display all the images in that directory in the GUI interface when if it's selected. However, since I will never know exactly how many images there are I am not entirely sure how to do this in the GUI. Essentially, I want to open the directory and all the images to be displayed in a grid on the GUI similar to

Consonance (superposition) of recorded sounds in Matlab

╄→гoц情女王★ 提交于 2019-12-24 06:24:12
问题 I make a project - Piano simulator in Matlab. I am able to play multiple sounds in the same time: M=length(number); freq_sampling = handles.freq_sampling; for i=1:M filename_in=['audio/' num2str(number(i)) '.mat']; load(filename_in) try %just for safety y_sound=y_sound+y; catch y_sound=y; end end sound(y_sound,freq_sampling) Problem is with recording and playing it later - this code below concatenates all pressed buttons into one sound vector: if record_on == 1 sound_vector_long = handles

Converting Matlab GUI into a guide GUI

我只是一个虾纸丫 提交于 2019-12-23 12:36:14
问题 I have inherited a pile of Matlab scripts that manually build a GUI using calls to uicontrol, uimenu, etc. Over the years we have needed to remove and add elements to the GUI and since all the positions are specified manually in the scripts, the layout hasn't really changed to accommodate the missing elements so it is really starting to look like a pile of trash. Is there a way to automatically convert my matlab scripted gui into something I can use with guide? I would rather not have to

How to align text to the top of the button in Matlab GUI?

对着背影说爱祢 提交于 2019-12-23 10:08:26
问题 I have a GUI with big buttons and wouls like to align the text in the button to the top, all I found is "horizontal alignment" property. Thanks... 回答1: You need to access the underlying Java Swing component (I am using FINDJOBJ function): figure('Menubar','none', 'Position',[200 200 300 200]) h = uicontrol('Style','pushbutton', 'String','click', ... 'Units','normalized', 'Position',[0.3 0.3 0.5 0.5]); jh = findjobj(h); jh.setVerticalAlignment( javax.swing.AbstractButton.BOTTOM ); 回答2: I'm