Sunteți pe pagina 1din 6

Mapua University

Muralla st. Intramuros, Manila

In partial fulfillment of the


requirements for the subject
Math 15-1
Section : A1

By:
Emmanuel Federico G. Eduarte
CEM/3

April 2019
Mapua University
Muralla st. Intramuros, Manila

In partial fulfillment of the


requirements for the subject
Math 15-1
Section : A1

By:
Calvin Joshua C. Lacson
CEM/3

April 2019
Short description of the Project:

This project is a simple program made using Matlab,


a multi-paradigm numerical computing environment and
proprietary programming language developed by MathWorks.
The objective of this project is to be able to calculate the
determinant of a 3x3 matrix without the trouble of computing it
one after the other.

Figure 1: Setting up the program in GUI


Figure 2: Finished program

Codes used in the program are stated hereafter:


function pushbutton2_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
m1 = str2double(get(handles.m1,'String'));
m2 = str2double(get(handles.m6,'String'));
m3 = str2double(get(handles.m5,'String'));
m4 = str2double(get(handles.m2,'String'));
m5 = str2double(get(handles.m3,'String'));
m6 = str2double(get(handles.m4,'String'));
m7 = str2double(get(handles.m7,'String'));
m8 = str2double(get(handles.m6,'String'));
m9 = str2double(get(handles.m5,'String'));
A = [m1 m2 m3; m4 m5 m6; m7 m8 m9];
dtr = det(A);
set(handles.dtr,'String',dtr);
guidata(hObject,handles);
Short description of the Project:

This project is a simple program made using Matlab,


a multi-paradigm numerical computing environment and
proprietary programming language developed by MathWorks.
The program works as if to easily and hastly find the
determinant and as well as the trace of a 4x4 matrix By inputting
a set of numbers, this program can calculate the required data
without the inconvenience of solving it one by one.

Figure 1: Creating the program in GUI


Figure 2: Final run of the program

Here are the codes that were used for the said program:
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined r a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
v1 = str2double(get(handles.edit1,'String'));
v2 = str2double(get(handles.edit2,'String'));
v3 = str2double(get(handles.edit3,'String'));
v4 = str2double(get(handles.edit4,'String'));
v5 = str2double(get(handles.edit5,'String'));
v6 = str2double(get(handles.edit6,'String'));
v7 = str2double(get(handles.edit7,'String'));
v8 = str2double(get(handles.edit8,'String'));
v9 = str2double(get(handles.edit9,'String'));
v10 = str2double(get(handles.edit10,'String'));
v11 = str2double(get(handles.edit11,'String'));
v12 = str2double(get(handles.edit12,'String'));
v13 = str2double(get(handles.edit13,'String'));
v14 = str2double(get(handles.edit14,'String'));
v15 = str2double(get(handles.edit15,'String'));
v16 = str2double(get(handles.edit16,'String'));
A = [v1 v2 v3 v4 ;v5 v6 v7 v8; v9 v10 v11 v12; v13 v14 v15 v16];
t = trace(A);
d = det(A);
set(handles.d,'String',d);
set(handles.t,'String',t);
guidata(hObject,handles);

S-ar putea să vă placă și