Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2014
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. function pushbutton1_Callback(hObject, eventdata, handles)
  2. % hObject handle to pushbutton1 (see GCBO)
  3. % eventdata reserved - to be defined in a future version of MATLAB
  4. % handles structure with handles and user data (see GUIDATA)
  5. a = str2double(get(handles.editA,'String'));
  6. b = str2double(get(handles.editB,'String'));
  7. c = str2double(get(handles.editC,'String'));
  8. d = str2double(get(handles.editD,'String'));
  9.  
  10. x = roots([a b c d]);
  11. S = sprintf('X1 = %s\nX2 = %s\nX3 = %s', num2str(x(1)), num2str(x(2)), num2str(x(3)));
  12. set(handles.textSolve,'String',S);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement