I am unable to plot from Excel Sheet. My code is s follows. If someone can please help
function pushbutton1_Callback(hObject, eventdata, handles)% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
[file, path] = uigetfile('*.xls');handles.fileName = fullfile(file, path);guidata(hObject,handles);% --- Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles)% hObject handle to pushbutton2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)if isfield(handles, 'fileName') filename = get(handles.fileName); values = xlsread(filename); xCol = values(:,2); yCol = values(:,3); set(handles.axes1,'Visible','on'); plot(handles.axes1,xCol,yCol)end
Best Answer