matlab-guide

How to remove axis in MATLAB

烂漫一生 提交于 2019-12-01 17:45:54
axis off Not working. function displayResults(filename,hObject, eventdata, handles) % Open 'filename' file... for reading... fid = fopen(filename); for N=6:1:10 imagename = fgetl(fid); if ~ischar(imagename), break, end % Meaning: End of File... [x,map]=imread(imagename); rgb=ind2rgb(x,map); ax = handles.(sprintf('axes%d', N)); axis off; image(rgb, 'Parent', ax); end guidata(hObject,handles) Above code results in following output: I've highlighted axis in above figure. All images I've used is bitmap with bit depth of 8. I don't want those axis, how can I remove that? insert the following at the

How to pass function to radio button in a button group created using guide in MATLAB?

旧时模样 提交于 2019-12-01 08:26:58
I have created a button group with four radio buttons and a push button using guide. There are four functions, one for each radio button written separately. How do you to call these functions from respective radio buttons. When a push button is pressed, the function associated with the active radio button should execute. A solution for the Button Group Callback: SelectionChangeFCN Use the Selection Change callback property (right click on the Button Group and select View Callbacks->SelectionChangeFcn ) of the uipanel . The eventdata argument contains the handles to the current and previously

How to pass function to radio button in a button group created using guide in MATLAB?

久未见 提交于 2019-12-01 06:19:13
问题 I have created a button group with four radio buttons and a push button using guide. There are four functions, one for each radio button written separately. How do you to call these functions from respective radio buttons. When a push button is pressed, the function associated with the active radio button should execute. 回答1: A solution for the Button Group Callback: SelectionChangeFCN Use the Selection Change callback property (right click on the Button Group and select View Callbacks-

presenting motion of random walkers in matlab

99封情书 提交于 2019-12-01 00:55:16
I have simulated some random walkers. I used plot(xb,yb,'b--o') to show particles in each step. I saw a code in below link with beautiful particles with tail which moves in a blur way. Is there a way which I could my random walkers the same as the walkers in the link in mat lab? Could anyone tell me which should I use instead of the plot function I used? beautiful particles The code I tried: clear all close all lbox=20; %random fluctuation eta = (2.*pi).*.1; vs=0.02; n=200; birdl=[1:n]; axis([0 lbox 0 lbox]) axis('square') hold on xb=rand(n,1).*lbox; %first possition yb=rand(n,1).*lbox; %first

presenting motion of random walkers in matlab

大兔子大兔子 提交于 2019-11-30 19:27:15
问题 I have simulated some random walkers. I used plot(xb,yb,'b--o') to show particles in each step. I saw a code in below link with beautiful particles with tail which moves in a blur way. Is there a way which I could my random walkers the same as the walkers in the link in mat lab? Could anyone tell me which should I use instead of the plot function I used? beautiful particles The code I tried: clear all close all lbox=20; %random fluctuation eta = (2.*pi).*.1; vs=0.02; n=200; birdl=[1:n]; axis(

What is the best way to display a large text file in MATLAB GUIDE?

感情迁移 提交于 2019-11-30 15:43:10
How can a MATLAB GUIDE control be used to display the contents of a text file in a GUI? The text file may be very long or very wide so it should have the ability to have vertical and horizontal scroll bars. Amro A multi-line editbox may be the best choice to display the text. Example: %# read text file lines as cell array of strings fid = fopen( fullfile(matlabroot,'license.txt') ); str = textscan(fid, '%s', 'Delimiter','\n'); str = str{1}; fclose(fid); %# GUI with multi-line editbox hFig = figure('Menubar','none', 'Toolbar','none'); hPan = uipanel(hFig, 'Title','Display window', ... 'Units',

Is it possible to execute compiled code both within and out of MATLAB environment?

痴心易碎 提交于 2019-11-30 09:25:08
问题 Let me explain what I am trying to do. I have an application coded in Matlab and I would like to provide it to both Matlab users and non-Matlab users. So you would say : Just compiled it and deploy an executable. Fine. But deployed application are somehow limited in what you can do (very importantly, you can't execute other M-file) so I would like to ALSO make it possible to Matlab users to start the deployed application from Within Matlab and provide these advanced capabilities for these

Can you limit what characters can be typed into a MATLAB GUI editbox?

蹲街弑〆低调 提交于 2019-11-30 03:43:50
问题 I want to make an editbox in a MATLAB GUI which will only allow numbers or only allow letters to be typed into it. Is this possible? 回答1: There is no such feature, at least not a documented one. You could assign a callback that will check the input, but that will happen after the user entered illegal character. Though I don't know how exactly to do it, my guess is that you can use Java GUI. Another interesting option is to add an ActiveX that will do the job. Edit: I have found an ActiveX

Is the MATLAB gui creator GUIDE as awful as I think? Is there an alternative? [closed]

梦想的初衷 提交于 2019-11-29 21:48:58
I've been trying to put together a gui in MATLAB and have had great difficulty. Here is a little background about my program: I want to create a wizard to step users through an image analysis process. The wizard will cue users for their input and then perform an image processing action once a button labeled "Next" has been pressed, and so on. From reading the MATLAB help I believe there are two approaches to gui creation: 1. write a gui with lines of code. 2. use GUIDE. I figured GUIDE would have the shallowest learning curve. At first the process was straight-forward. I could drag and drop

save GUI figure in matlab

為{幸葍}努か 提交于 2019-11-29 17:27:17
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('Property','Value',...) creates a new QUADRATIC or raises the % existing singleton*. Starting from the left,