thx walter. I guess i have to show you the code. Do give some comments.
These are my button callback:
function add_pushbutton_Callback(hObject, eventdata, handles)
cost1 = cell2mat(get(handles.uitable1,'Data'));
mwlimits1 = cell2mat(get(handles.uitable2,'Data'));
Pdt = str2num(get(handles.input3_editText,'String'));
lambda1 = mat2cell(lambda);
set(handles.answer1_staticText,'Data', lambda1);
Pgg1 = mat2cell(Pgg);
set(handles.answer2_staticText,'Data', Pgg1);
totalcost1 = num2str(totalcost);
set(handles.answer3_staticText,'Data', totalcost1);
guidata(hObject, handles);
This are my uitable callback that you suggest:
handles.uitable1 = hObject;
guidata(hObject,handles);
These are my edit text callback:
function input1_editText_Callback(hObject, eventdata, handles)
input = str2num(get(hObject,'String'));
if (isempty(input))
set(hObject,'String','0')
end
guidata(hObject, handles);
function input1_editText_CreateFcn(hObject, eventdata, handles)
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
So basically, i have a figure with 3 input from user which includes 2 uitables and 1 edit text. And i have to push buttons and i have to generate the answer into 3 which is lambda,pgg1 and totalcost. So what do you think.. Thank you again =)