Prev: SPECT Projection Reconstruction & Sinograms
Next: truck dynamics simulation model in simmechanics
From: Zia on 14 May 2010 05:58 Hi, I am importing data from excel into matlab so that i can plot different graphs. I am using exactly the same procedure as in the video tutorial by Doug Hull i.e. http://blogs.mathworks.com/pick/2007/08/13/video-series-reading-excel-data-into-matlab-with-a-gui/ The problem that i am having is its not reading in the colNames properly and i am having '#N/A' as colNames. the script is as: function results_Callback(hObject, eventdata, handles) % hObject handle to results (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) handles.fileName = uigetfile('*.xls') guidata(hObject, handles) setPopupmenuString(handles.popupmenuX, eventdata, handles) setPopupmenuString(handles.popupmenuY, eventdata, handles) function setPopupmenuString(hObject, eventdata, handles) fileName = handles.fileName; [numbers, colNames]= xlsread(fileName); set(hObject,'string',colNames); Can anybody help me. Thanks in advance.
From: us on 14 May 2010 07:17 "Zia " <ziagemini(a)hotmail.com> wrote in message <hsj6rc$pbm$1(a)fred.mathworks.com>... > Hi, > > I am importing data from excel into matlab so that i can plot different graphs. I am using exactly the same procedure as in the video tutorial by Doug Hull i.e. > http://blogs.mathworks.com/pick/2007/08/13/video-series-reading-excel-data-into-matlab-with-a-gui/ > > The problem that i am having is its not reading in the colNames properly and i am having '#N/A' as colNames. the script is as: > > function results_Callback(hObject, eventdata, handles) > % hObject handle to results (see GCBO) > % eventdata reserved - to be defined in a future version of MATLAB > % handles structure with handles and user data (see GUIDATA) > handles.fileName = uigetfile('*.xls') > guidata(hObject, handles) > setPopupmenuString(handles.popupmenuX, eventdata, handles) > setPopupmenuString(handles.popupmenuY, eventdata, handles) > > function setPopupmenuString(hObject, eventdata, handles) > > fileName = handles.fileName; > [numbers, colNames]= xlsread(fileName); > set(hObject,'string',colNames); > > Can anybody help me. Thanks in advance. a hint: - look at and use the third output var... help xlsread; us
|
Pages: 1 Prev: SPECT Projection Reconstruction & Sinograms Next: truck dynamics simulation model in simmechanics |