jbcb
Computer
- Oct 14, 2003
- 5
i am trying to plot something in the axes1 in GUIDE, and doing so, i need to retrieve the information that the user entered from the 4 edit boxes....
the question is, how do i create a command button, e.g.plot graph, so that it can takes in the values from all the edit boxes and plot them?
i've done something like this: -
lone = str2double(get(handles.edit4,'String'));
ltwo = str2double(get(handles.edit5,'String'));
labc = str2double(get(handles.edit2,'String'));
habc = str2double(get(handles.edit3,'String'));
where: -
Ax = lone;
Ay = ltwo + habc;
Bx = lone;
By = ltwo + habc;
Cx = lone;
Cy = ltwo;
Dx = lone + labc;
Dy = ltwo;
function pushbutton2_Callback(hObject, eventdata, handles)
currentVal = get(handles.ResultsList,'Value');
plot (Ax,Ay)
hold on
plot (Bx,By)
plot (Cx,Cy)
plot (Dx,Dy)
-------------------------
the codes above doesnt plot.... please help! can you also tell me which help file i need to go to to get more info?
the question is, how do i create a command button, e.g.plot graph, so that it can takes in the values from all the edit boxes and plot them?
i've done something like this: -
lone = str2double(get(handles.edit4,'String'));
ltwo = str2double(get(handles.edit5,'String'));
labc = str2double(get(handles.edit2,'String'));
habc = str2double(get(handles.edit3,'String'));
where: -
Ax = lone;
Ay = ltwo + habc;
Bx = lone;
By = ltwo + habc;
Cx = lone;
Cy = ltwo;
Dx = lone + labc;
Dy = ltwo;
function pushbutton2_Callback(hObject, eventdata, handles)
currentVal = get(handles.ResultsList,'Value');
plot (Ax,Ay)
hold on
plot (Bx,By)
plot (Cx,Cy)
plot (Dx,Dy)
-------------------------
the codes above doesnt plot.... please help! can you also tell me which help file i need to go to to get more info?