Asignatura:: Análisis de Circuitos Eléctricos

Download as pdf or txt
Download as pdf or txt
You are on page 1of 16

ASIGNATURA:

ANÁLISIS DE CIRCUITOS ELÉCTRICOS

ELABORADO POR:

GABRIEL MALLA

TUTOR:

KATYA TORRES

NRC:

7812

TEMA:

CODIGO DEL PROYECTO

FECHA DE ENTREGA:

30/7/20
function varargout = Circuits(varargin)
% CIRCUITS MATLAB code for Circuits.fig
% CIRCUITS, by itself, creates a new CIRCUITS or raises the existing
% singleton*.
%
% H = CIRCUITS returns the handle to a new CIRCUITS or the handle to
% the existing singleton*.
%
% CIRCUITS('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in CIRCUITS.M with the given input
arguments.
%
% CIRCUITS('Property','Value',...) creates a new CIRCUITS or raises
the
% existing singleton*. Starting from the left, property value pairs
are
% applied to the GUI before Circuits_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property
application
% stop. All inputs are passed to Circuits_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 Circuits

% Last Modified by GUIDE v2.5 03-Aug-2020 11:43:27

% Begin initialization code - DO NOT EDIT


gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @Circuits_OpeningFcn, ...
'gui_OutputFcn', @Circuits_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 Circuits is made visible.
function Circuits_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 Circuits (see VARARGIN)

% Choose default command line output for Circuits


handles.output = hObject;
axes(handles.axes5);
axis off;
% Update handles structure
guidata(hObject, handles);

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


% uiwait(handles.figure1);

% --- Outputs from this function are returned to the command line.
function varargout = Circuits_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 popupmenu1_CreateFcn(hObject, eventdata, handles)


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

% Hint: popupmenu 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 during object creation, after setting all properties.


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

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


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

% Hint: place code in OpeningFcn to populate axes10

% --- Executes on mouse press over axes background.


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

% --- If Enable == 'on', executes on mouse press in 5 pixel border.


% --- Otherwise, executes on mouse press in 5 pixel border or over
popupmenu1.

% hObject handle to popupmenu1 (see GCBO)


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

% Hint: place code in OpeningFcn to populate axes4

% --- Executes on button press in pushbutton3.

% hObject handle to pushbutton3 (see GCBO)


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

function edit1_Callback(hObject, eventdata, handles)


NewStrVal=get(hObject, 'String');
NewVal=str2double(NewStrVal);
handles.edit1=NewVal;
guidata(hObject, handles);
% hObject handle to edit1 (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 edit1 as text


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

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

function edit1_CreateFcn(hObject, eventdata, handles)


% hObject handle to edit1 (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 edit2_Callback(hObject, eventdata, handles)


NewStrVal=get(hObject, 'String');
NewVal=str2double(NewStrVal);
handles.edit2=NewVal;
guidata(hObject, handles);
% hObject handle to edit2 (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 edit2 as text


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

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


function edit2_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit2 (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 edit3_Callback(hObject, eventdata, handles)


NewStrVal=get(hObject, 'String');
NewVal=str2double(NewStrVal);
handles.edit3=NewVal;
guidata(hObject, handles);
% hObject handle to edit3 (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 edit3 as text


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

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


function edit3_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit3 (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)


NewStrVal=get(hObject, 'String');
NewVal=str2double(NewStrVal);
handles.edit4=NewVal;
guidata(hObject, 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 edit12_Callback(hObject, eventdata, handles)


NewStrVal=get(hObject, 'String');
NewVal=str2double(NewStrVal);
handles.edit12=NewVal;
guidata(hObject, handles);
% hObject handle to edit12 (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 edit12 as text


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

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


function edit12_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit12 (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 edit13_Callback(hObject, eventdata, handles)


NewStrVal=get(hObject, 'String');
NewVal=str2double(NewStrVal);
handles.edit13=NewVal;
guidata(hObject, handles);
% hObject handle to edit13 (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 edit13 as text


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

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


function edit13_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit13 (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

%EJECUTAR
% --- Executes on button press in pushbutton4.

function pushbutton3_Callback(hObject, eventdata, handles)


axes(handles.axes5)
imshow('RLC_serie.png');
a1=handles.edit12;
a2=handles.edit13;
R=handles.edit1;
L=handles.edit2;
C=handles.edit3;
F=handles.edit4;

alpha=(R)/(2*L);
Wo=(1)/((L*C)^(1/2));
%s1=(-alpha+(alpha^2-Wo^2)^(1/2));
%s2=(-alpha-(alpha^2-Wo^2)^(1/2));
set(handles.edit7,'String',alpha);
set(handles.edit8,'String',Wo);
%set(handles.pu,'String',real(s1));
%set(handles.edit17,'String',imag(s1));

if (alpha > Wo)


%sobreamortiguado
alpha=(R)/(2*L);
Wo=(1)/((L*C)^(1/2));
Tip='Circuito Sobreamortiguado';
set(handles.edit9,'String',Tip);
set(handles.edit8,'String',a);
s1=(-alpha+(alpha^2-Wo^2)^(1/2));
s2=(-alpha-(alpha^2-Wo^2)^(1/2));

A2=((a2/C)-(a1*s1)+(F*s1))/(-s1+s2);
A1=a1-F-A2;
B1=R/L;
C1=1/(L*C);
mss=['[d^2v/dt^2]+',num2str(B1),'[dv/dt]+',num2str(C1),'v=',num2str(C1*F)
];
set(handles.edit10,'String',mss);
mss1=['v(t)=[',num2str(A1),']exp(',num2str(s1),'t)+[',num2str(A2),']exp('
,num2str(s2),'t)+',num2str(F)];
set(handles.edit11,'String',mss1);
t=0:0.02:20;
v=A1.*exp(s1*t)+A2.*exp(s2*t)+F;
plot(handles.axes10,t,v);
grid on

end
if(alpha == Wo)
%Criticamente amortiguado
Tip='C. Críticamente Amortiguado';
set(handles.edit9,'String',Tip);
alpha=(R)/(2*L);
A1=a1-F;
A2=(a2/C)+(alpha*a1)-(alpha*F);
B1=R/L;
C1=1/(L*C);

mss=['[d^2v/dt^2]+',num2str(B1),'[dv/dt]+',num2str(C1),'v=',num2str(C1*F)
];
set(handles.edit10,'String',mss);
mss1=['v(t)=[',num2str(A1),'+(',num2str(A2),')t]exp(',num2str(-
alpha),'t)+',num2str(F)];
set(handles.edit11,'String',mss1);

t= 0:0.02:20;
v=((A1.*exp(-1*alpha*t))+(A2*t.*exp(-1*alpha*t))+F);
plot(handles.axes10,t,v);
grid on
end
if (alpha < Wo)
%Subamortiguado
Tip='Circuito Subamortiguado';
set(handles.edit9,'String',Tip);
alpha=(R)/(2*L);
Wd=(Wo^2-alpha^2)^(1/2);
A1=a1-F;
A2=((a2/C)+(alpha*A1))/(Wd);
B1=R/L;
C1=1/(L*C);

mss=['[d^2v/dt^2]+',num2str(B1),'[dv/dt]+',num2str(C1),'v=',num2str(C1*F)
];
set(handles.edit10,'String',mss);

mss1=['v(t)=[[',num2str(A1),']cos(',num2str(Wd),'t)+[',num2str(A2),']sin(
',num2str(Wd),'t)].*exp(-',num2str(alpha),')+',num2str(F)];
set(handles.edit11,'String',mss1);

t=a0:0.02:20;
v=A1*cos(Wd*t).*exp(-alpha*t)+A2*sin(Wd*t).*exp(-alpha*t)+F;
plot(handles.axes10,t,v);
grid on
end
guidata(hObject, handles);

function pushbutton4_Callback(hObject, eventdata, handles)


axes(handles.axes5)
imshow('RLC_paralelo.png');
a1=handles.edit12;
a2=handles.edit13;
R=handles.edit1;
L=handles.edit2;
C=handles.edit3;
F=handles.edit4;

alpha=(1)/(2*R*C);
Wo=(1)/((L*C)^(1/2));
s1=(-alpha+(alpha^2-Wo^2)^(1/2));
s2=(-alpha-(alpha^2-Wo^2)^(1/2));
set(handles.edit7,'String',alpha);
set(handles.edit8,'String',Wo);
set(handles.pu,'String',real(s1));
set(handles.edit17,'String',imag(s1));
if (alpha > Wo)
%sobreamortiguado
alpha=(1)/(2*R*C);
Wo=(1)/((L*C)^(1/2));
Tip='Circuito Sobreamortiguado';
set(handles.edit9,'String',Tip);
s1=(-alpha+(alpha^2-Wo^2)^(1/2));
s2=(-alpha-(alpha^2-Wo^2)^(1/2));

A2=((a1/L)-(s1*a2)+(F*s1))/(-s1+s2);
A1=a2-F-A2;
B1=1/(R*C);
C1=1/(L*C);
mss=['[d^2i/dt^2]+',num2str(B1),'[di/dt]+',num2str(C1),'i=',num2str(C1*F)
];
set(handles.edit10,'String',mss);
mss1=['i(t)=[',num2str(A1),']exp(',num2str(s1),'t)+[',num2str(A2),']exp('
,num2str(s2),'t)+',num2str(F)];
set(handles.edit11,'String',mss1);

t=a1:0.02:20;
i=A1.*exp(s1*t)+A2.*exp(s2*t)+F;
plot(handles.axes10,t,i);
grid on

end
if(alpha == Wo)
%Criticamente amortiguado
Tip='C. Críticamente Amortiguado';
set(handles.edit9,'String',Tip);
alpha=(1)/(2*R*C);
A2=(a1/L)+(alpha*a2)-(alpha*F);
A1=a2-F;
B1=1/(R*C);
C1=1/(L*C);

mss=['[d^2i/dt^2]+',num2str(B1),'[di/dt]+',num2str(C1),'i=',num2str(C1*F)
];
set(handles.edit10,'String',mss);
mss1=['i(t)=[',num2str(A1),'+(',num2str(A2),')t]exp(',num2str(-
alpha),'t)+',num2str(F)];
set(handles.edit11,'String',mss1);

t=a1:0.02:20;
i=((A1)*(exp(-(alpha)*t)))+((A2*t)*(exp(-(alpha)*t)))+F;
plot(handles.axes10,t,i);
grid on
end
if (alpha < Wo)
%Subamortiguado
Tip='Circuito Subamortiguado';
set(handles.edit9,'String',Tip);
alpha=(1)/(2*R*C);
Wd=(Wo^2-alpha^2)^(1/2);
A1=a2-F;
A2=((a1/L)+(alpha*A1))/(Wd);
B1=1/(R*C);
C1=1/(L*C);

mss=['[d^2i/dt^2]+',num2str(B1),'[di/dt]+',num2str(C1),'i=',num2str(C1*F)
];
set(handles.edit10,'String',mss);

mss1=['i(t)=[[',num2str(A1),']cos(',num2str(Wd),'t)+[',num2str(A2),']sin(
',num2str(Wd),'t)].*exp(-',num2str(alpha),')+',num2str(F)];
set(handles.edit11,'String',mss1);

t=0:0.02:20;
i=(A1*cos(Wd*t).*exp(-alpha*t))+(A2*sin(Wd*t).*exp(-
alpha*t))+F;
plot(handles.axes10,t,i);
grid on
end
guidata(hObject, handles);

% hObject handle to pushbutton4 (see GCBO)


% eventdata reserved - to be defined in a future version of MATLAB

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

function edit7_Callback(hObject, eventdata, handles)


% hObject handle to edit7 (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 edit7 as text


% str2double(get(hObject,'String')) returns contents of edit7 as a
double
% --- Executes during object creation, after setting all properties.
function edit7_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit7 (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 edit8_Callback(hObject, eventdata, handles)


% hObject handle to edit8 (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 edit8 as text


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

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


function edit8_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit8 (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 edit9_Callback(hObject, eventdata, handles)


% hObject handle to edit9 (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 edit9 as text


% str2double(get(hObject,'String')) returns contents of edit9 as a
double
% --- Executes during object creation, after setting all properties.
function edit9_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit9 (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 during object creation, after setting all properties.

function edit10_Callback(hObject, eventdata, handles)

% hObject handle to edit10 (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 edit10 as text


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

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


function edit10_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit10 (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 during object creation, after setting all properties.


function edit11_Callback(hObject, eventdata, handles)
% hObject handle to edit11 (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 edit11 as text


% str2double(get(hObject,'String')) returns contents of edit11 as
a double
% --- Executes during object creation, after setting all properties.
function edit11_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit11 (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 edit14_Callback(hObject, eventdata, handles)


% hObject handle to edit14 (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 edit14 as text


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

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


function edit14_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit14 (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 edit15_Callback(hObject, eventdata, handles)


% hObject handle to edit15 (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 edit15 as text


% str2double(get(hObject,'String')) returns contents of edit15 as
a double
% --- Executes during object creation, after setting all properties.
function edit15_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit15 (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 pu_Callback(hObject, eventdata, handles)


% hObject handle to pu (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 pu as text


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

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


function pu_CreateFcn(hObject, eventdata, handles)
% hObject handle to pu (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 edit17_Callback(hObject, eventdata, handles)


% hObject handle to edit17 (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 edit17 as text


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

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


function edit17_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit17 (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

You might also like