Witam,
po 3 latach przerwy przyszło mi napisać prosty 'program' do rysowania wykresów i robię pewnie jakiś podstawowy błąd.
% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
a=get(handles.edit1,'String');
b=get(handles.edit2,'String');
x=0:0.01:10;
y=a+x;
handles.axes1=plot(x,y);
% handles structure with handles and user data (see GUIDATA)
A błąd jest po naciśnięciu przycisku:
??? Undefined function or method 'plus' for input arguments of type
'cell'.
Error in ==> przyklad>pushbutton1_Callback at 129
y=a+x;
Error in ==> gui_mainfcn at 96
feval(varargin{:});
Error in ==> przyklad at 42
gui_mainfcn(gui_State, varargin{:});
Error in ==>
@(hObject,eventdata)przyklad('pushbutton1_Callback',hObject,eventdata,guidata(hObject))
??? Error while evaluating uicontrol Callback
Co robię nie tak?
pozdrawiam,