Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Statement of the Problem

jrnfjsdahfjhsd

Statement of the Problem: As for Engineering students solving polynomial is really needed but it consumes a lot of time and effort even if you master the formula or can solve fast. Purpose of the Project: This project of this application is to apply our programming skills using MatLab R2016a or any MatLab version. Vector to Polynomial solver is an application which ask the user to input vector which will be converted into polynomial. After converting the given vector the application will now solve for the roots of the polynomial. Matlab GUIDE Code function varargout = CSVTP(varargin) gui_Singleton = 1; gui_State = struct('gui_Name', mfilename, ... 'gui_Singleton', gui_Singleton, ... 'gui_OpeningFcn', @CSVTP_OpeningFcn, ... 'gui_OutputFcn', @CSVTP_OutputFcn, ... 'gui_LayoutFcn', [] , ... 'gui_Callback', []); if nargin && ischar(varargin{1}) gui_State.gui_Callback = str2func(varargin{1}); end if nargout [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:}); else gui_mainfcn(gui_State, varargin{:}); end function CSVTP_OpeningFcn(hObject, ~, handles, varargin) handles.output = hObject; guidata(hObject, handles); function varargout = CSVTP_OutputFcn(~, ~, handles) varargout{1} = handles.output; function inp_Callback(~, ~, ~) function inp_CreateFcn(hObject, ~, ~) if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end function pbconsol_Callback(~, ~, handles) a=get(handles.inp,'string'); b=str2num(a); c=poly2str(b,'x'); set(handles.out1,'string',c); set(handles.wait, 'String', 'Answer from Given Input!'); k=get(handles.inp,'string'); d=str2num(k); e=roots(d) f=num2str(e) set(handles.gett, 'String', 'Roots from the Given Polynomial!'); set(handles.out2,'string' ,f); j=get(handles.inp,'string'); l=str2num(j); c=poly2str(l,'x'); plot(l ,'-.b','LineWidth',2); function axes1_CreateFcn(~, ~, ~) function pushbutton3_Callback(hObject, eventdata, handles) function pushbutton4_Callback(hObject, eventdata, handles) Code Description All the function that was not use was auto generated by the MatLab GUIDE you can delete or leave it there still the application will run accordingly to what was programmed. Declared Tag: Edit Text inp – This is where the user can input his/her desired input must be related to the input sample by the programmer. out1 – This is where the converted Vector to Polynomial will output base on the given input of the user. out2 – This is where the roots of the Polynomial will output base on the solved Polynomial by the program. Static Text wait – The programmer use a static text to confirm if the user input is already read by the application. gett – This was included to the program to show that the converted vector to polynomial is being solved by the application Push Button pbconsol – This button will serve as trigger to the application once the input was given and this button was pressed it will generate all the output needed by the user. Axes axes1 – This was included by the programmer just to show the plots of X of the polynomial. Figures Code Screen Shots from MatLAB Editor/Script: Graphical User Interface Screen Shot from MatLAB GUIDE: Executed File Screen Shots: References: www.youtube.com www.mathworks.com