Rank: 60639 based on 0 downloads (last 30 days) and 0 files submitted
photo

Muhammad Bashir

E-mail

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Comments and Ratings by Muhammad
Updated File Comments Rating
02 Mar 2010 41 Complete GUI Examples 41 working GUIs to read and learn. Author: Matt Fig

Hej,

I have made Gui for excel data ploting in Matlab. I did it using the video of Mr Doug (http://blogs.mathworks.com/pick/2007/08/13/video-series-reading-excel-data-into-matlab-with-a-gui/). The gui works fine but the command wndow gives following error.

mainGui>pushbuttonLoadXLS_Callback at 130
setPopupString(handles.popupmenuX,eventdata, handles)
Error in ==> gui_mainfcn at 96
feval(varargin{:});
Error in ==> mainGui at 42
gui_mainfcn(gui_State, varargin{:});
??? Error while evaluating uicontrol Callback>

The gui i m using is:

<handles.fileName=uigetfile('*.xls')
guidata(hObject,handles)
setPopupString(handles.popupmenuX,eventdata, handles)
setPopupString(handles.popupmenuY,eventdata, handles)
set(handles.popmenuX,'callback','mainGui(''updatedAxes'',gcbo,[],guidata(gcbo))')
set(handles.popmenuY,'callback','mainGui(''updatedAxes'',gcbo,[],guidata(gcbo))')
function setPopupmenuString(hObject, eventdata, handles)

fileName=handles.fileName;
[numbers, colNames]=xlsread(fileName);
set(hObject,'string',colNames);

function [x y] = readExcelColumns(fileName, xColNum, yColNum)

a = xlsread(fileName);

x=a(:, xColNum); % x-axis values containing all the rows and column #
y=a(:, yColNum); % y-axis values containing all the rows and coumn #

function updateAxes(hObject, eventdata, handles)

xColNum = get(handles.popmenuX, 'value');
yColNum = get(handles.popmenuY, 'value');
fileName= handles.fileName;

[x y] = readExcelColumns(fileName, xColNum, yColNum)

plot(handles.axes1,x,y)>

Contact us at files@mathworks.com