×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

help me, i am a beginner!

help me, i am a beginner!

help me, i am a beginner!

(OP)
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?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources