From: Muhammad Bashir on 2 Mar 2010 10:57 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)>
|
Pages: 1 Prev: PTB 'DrawText' over several lines Next: elliptic iir filter, boundary condition, tailing off |