Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function pushbutton1_Callback(hObject, eventdata, handles)
- % hObject handle to pushbutton1 (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
- a = str2double(get(handles.editA,'String'));
- b = str2double(get(handles.editB,'String'));
- c = str2double(get(handles.editC,'String'));
- d = str2double(get(handles.editD,'String'));
- x = roots([a b c d]);
- S = sprintf('X1 = %s\nX2 = %s\nX3 = %s', num2str(x(1)), num2str(x(2)), num2str(x(3)));
- set(handles.textSolve,'String',S);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement