Hey everybody,
I am working on project in matlab, and i first have to add and remove a row from a table in the GUI
after contructing the different items to the GUI , I wrote the code the following way:
% --- Executes just before untitled is made visible.
function untitled_OpeningFcn(hObject, eventdata, handles, varargin)% Choose default command line output for untitled
handles.output = hObject;% Update handles structure
guidata(hObject, handles);% --- Outputs from this function are returned to the command line.
function varargout = untitled_OutputFcn(hObject, eventdata, handles) % Get default command line output from handles structure
varargout{1} = handles.output;% --- Executes on button press in add.
function add_Callback(hObject, eventdata, handles)data = get(handles.uitable1, 'data');data(end+1,:) = 0;set(handles.uitable1, 'data', data);% --- Executes on button press in remove.
function remove_Callback(hObject, eventdata, handles)data = get(handles.uitable1, 'data');data(end-1,:);set(handles.uitable1, 'data', data);
but it is somehow not working, the following error statment show up when I click on the button "Add" and the button "remove" does not respond at all!
What I am doing wrong ?
As you might have notice, I derived the code to "remove" from the one to "add", is that the right way to do ?
thank you in advance,
Paul
Best Answer