Stuart’s MATLAB Videos

Watch and Learn

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

GUI building in MATLAB 8

Posted by Doug Hull,

This post is a continuation of the last video where we built a simple GUI in MATLAB. This continues by showing how to run initiation code for a MATLAB GUI and explains what the handles structure is.

8 CommentsOldest to Newest

John replied on : 1 of 8

Another useful video for learning Matlab!

One thing that would be great though, seeing as you’re making so many videos, would be to perhaps get a better microphone and reduce the gain, there is a lot of distortion in your voice recording which makes it harder to listen to. A pop filter or other covering for the microphone would also help a lot

vivekram replied on : 2 of 8

Hi Doug,

I would like to know how i can move an object inside one plot to another plot within the same GUI which was created using GUIDE function.

Thanks

Vivekram

Evelyne replied on : 5 of 8

the movie stops running after a minute or so.
Do you have the code? then I’ll figure out myself

hui replied on : 7 of 8

the data from ecxel file could not be showed in axes1. I don’t know why. Here is the script i did follow your viedo. Could you help me check where is the problem, please?

handles.filename = uigetfile(‘*.xlsx’)
guidata(hObject,handles)

setPopupmenuString(handles.popupmenu1,eventdata,handles);
setPopupmenuString(handles.popupmenu2,eventdata,handles);
set(handles.popupmenu1,’callback’,’@(hObject,eventdata)test(”updateAxes”,hObject,eventdata,guidata(hObject))’);
set(handles.popupmenu2,’callback’,’@(hObject,eventdata)test(”updateAxes”,hObject,eventdata,guidata(hObject))’);

function setPopupmenuString(hObject,eventdata,handles)

filename=handles.filename;
[numbers, colnames]=xlsread(filename);
set(hObject,’string’,colnames);

function [x y] =readexcelcolumns(filename,xcolnumber,ycolnumber)
a=xlsread(filename);
x=a(:,xcolnumber);
y=a(:,ycolnumber);

function updateAxes(hObject,eventdata,handles)
filename=handles.filename;
ycolnumber=get(handles.popupmenu1,’value’);
xcolnumber=get(handles.popupmenu2,’value’);

[x y] =readexcelcolumns(filename,xcolnumber,ycolnumber);
plot(x,y)

Add A Comment

Your email address will not be published. Required fields are marked *

Preview: hide