You are on page 1of 10

UNIVERSIDAD AUTONÓMA “TOMÁS FRIAS”

FACULDAD DE INGENIERÍA TECNOLÓGICA


CARRERA DE INGENIERÍA MECTRÓNICA

Tercer Parcial ETN-808


INTEGRANTES: Luis David Ramos Paitano

MATERIA: ETN-808

DOCENTE:

FECHA DE ENTREGA:
Objetivos

 Encontrar la incertidumbre, aplicación del método minima diferencia de


cuadrados.
Cálculos
rargout = terce(varargin)
% TERCE MATLAB code for terce.fig
% TERCE, by itself, creates a new TERCE or raises the existing
% singleton*.
%
% H = TERCE returns the handle to a new TERCE or the handle to
% the existing singleton*.
%
% TERCE('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in TERCE.M with the given input arguments.
%
% TERCE('Property','Value',...) creates a new TERCE or raises the
% existing singleton*. Starting from the left, property value pairs
are
% applied to the GUI before terce_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property
application
% stop. All inputs are passed to terce_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only
one
% instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES

% Edit the above text to modify the response to help terce

% Last Modified by GUIDE v2.5 23-Sep-2020 01:33:20

% Begin initialization code - DO NOT EDIT


gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @terce_OpeningFcn, ...
'gui_OutputFcn', @terce_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
% End initialization code - DO NOT EDIT

% --- Executes just before terce is made visible.


function terce_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to terce (see VARARGIN)
% Choose default command line output for terce
handles.output = hObject;

% Update handles structure


guidata(hObject, handles);

% UIWAIT makes terce wait for user response (see UIRESUME)


% uiwait(handles.figure1);

% --- Outputs from this function are returned to the command line.
function varargout = terce_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% Get default command line output from handles structure


varargout{1} = handles.output;

function editA_Callback(hObject, eventdata, handles)


% hObject handle to editA (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of editA as text


% str2double(get(hObject,'String')) returns contents of editA as a
double

% --- Executes during object creation, after setting all properties.


function editA_CreateFcn(hObject, eventdata, handles)
% hObject handle to editA (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns
called

% Hint: edit controls usually have a white background on Windows.


% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

function editB_Callback(hObject, eventdata, handles)


% hObject handle to editB (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of editB as text
% str2double(get(hObject,'String')) returns contents of editB as a
double

% --- Executes during object creation, after setting all properties.


function editB_CreateFcn(hObject, eventdata, handles)
% hObject handle to editB (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns
called

% Hint: edit controls usually have a white background on Windows.


% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

function editC_Callback(hObject, eventdata, handles)


% hObject handle to editC (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of editC as text


% str2double(get(hObject,'String')) returns contents of editC as a
double

% --- Executes during object creation, after setting all properties.


function editC_CreateFcn(hObject, eventdata, handles)
% hObject handle to editC (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns
called

% Hint: edit controls usually have a white background on Windows.


% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

function edit4_Callback(hObject, eventdata, handles)


% hObject handle to edit4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit4 as text


% str2double(get(hObject,'String')) returns contents of edit4 as a
double

% --- Executes during object creation, after setting all properties.


function edit4_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns
called

% Hint: edit controls usually have a white background on Windows.


% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

function edit5_Callback(hObject, eventdata, handles)


% hObject handle to edit5 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit5 as text


% str2double(get(hObject,'String')) returns contents of edit5 as a
double

% --- Executes during object creation, after setting all properties.


function edit5_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit5 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns
called

% Hint: edit controls usually have a white background on Windows.


% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function edit6_Callback(hObject, eventdata, handles)
% hObject handle to edit6 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit6 as text


% str2double(get(hObject,'String')) returns contents of edit6 as a
double

% --- Executes during object creation, after setting all properties.


function edit6_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit6 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns
called

% Hint: edit controls usually have a white background on Windows.


% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

% --- Executes on button press in bt_calcular.


function bt_calcular_Callback(hObject, eventdata, handles)
% hObject handle to bt_calcular (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=A+B;
set(handles.editC,'string',C);
tini=str2double(get(handles.edit_tini,'string'));
tfin=str2double(get(handles.edit_tfin,'string'));
dt=str2double(get(handles.edit_dt,'string'));
X=tini:dt:tfin;
Y=A*X+B
set(handles.listbox1,'string',X);
set(handles.listbox2,'string',Y);
plot(X,Y);
% --- Executes on selection change in listbox1.
function listbox1_Callback(hObject, eventdata, handles)
% hObject handle to listbox1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% Hints: contents = cellstr(get(hObject,'String')) returns listbox1


contents as cell array
% contents{get(hObject,'Value')} returns selected item from
listbox
% --- Executes during object creation, after setting all properties.
function listbox1_CreateFcn(hObject, eventdata, handles)
% hObject handle to listbox1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns
called

% Hint: listbox controls usually have a white background on Windows.


% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
% --- Executes on selection change in listbox2.
function listbox2_Callback(hObject, eventdata, handles)
% hObject handle to listbox2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: contents = cellstr(get(hObject,'String')) returns listbox2
contents as cell array
% contents{get(hObject,'Value')} returns selected item from
listbox2

% --- Executes during object creation, after setting all properties.


function listbox2_CreateFcn(hObject, eventdata, handles)
% hObject handle to listbox2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns
called

% Hint: listbox controls usually have a white background on Windows.


% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function edit_tini_Callback(hObject, eventdata, handles)
% hObject handle to edit_tini (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit_tini as text


% str2double(get(hObject,'String')) returns contents of edit_tini
as a double
% --- Executes during object creation, after setting all properties.
function edit_tini_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit_tini (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns
called

% Hint: edit controls usually have a white background on Windows.


% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function edit_dt_Callback(hObject, eventdata, handles)
% hObject handle to edit_dt (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit_dt as text


% str2double(get(hObject,'String')) returns contents of edit_dt as
a double
% --- Executes during object creation, after setting all properties.
function edit_dt_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit_dt (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns
called

% Hint: edit controls usually have a white background on Windows.


% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function edit_tfin_Callback(hObject, eventdata, handles)
% hObject handle to edit_tfin (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit_tfin as text


% str2double(get(hObject,'String')) returns contents of edit_tfin
as a double

% --- Executes during object creation, after setting all properties.


function edit_tfin_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit_tfin (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns
called

% Hint: edit controls usually have a white background on Windows.


% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
a)

Conclusiones
Sepuedeusar algunesfunciones como:push button, edit, text lable,
axes.
Para realizar elexamen senecesita un conocimientoamplio d l
herramienta de matlab.

You might also like