ERROR CON GUIDE MAT LAB
Publicado por Byron (12 intervenciones) el 29/06/2020 08:20:07
Me aparece este error en Guide con mat lab , alguien me podría ayudar por favor.Se los agradecería mucho


Valora esta pregunta


0
function varargout = ejercicio2(varargin)
% EJERCICIO2 MATLAB code for ejercicio2.fig
% EJERCICIO2, by itself, creates a new EJERCICIO2 or raises the existing
% singleton*.
%
% H = EJERCICIO2 returns the handle to a new EJERCICIO2 or the handle to
% the existing singleton*.
%
% EJERCICIO2('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in EJERCICIO2.M with the given input arguments.
%
% EJERCICIO2('Property','Value',...) creates a new EJERCICIO2 or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before ejercicio2_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to ejercicio2_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 ejercicio2
% Last Modified by GUIDE v2.5 29-Jun-2020 15:47:27
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @ejercicio2_OpeningFcn, ...
'gui_OutputFcn', @ejercicio2_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 ejercicio2 is made visible.
function ejercicio2_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 ejercicio2 (see VARARGIN)
a=imread('1.1.jpg');
image(a);
axis off
% Choose default command line output for ejercicio2
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes ejercicio2 wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = ejercicio2_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 T_Callback(hObject, eventdata, handles)
% hObject handle to T (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 T as text
% str2double(get(hObject,'String')) returns contents of T as a double
% --- Executes during object creation, after setting all properties.
function T_CreateFcn(hObject, eventdata, handles)
% hObject handle to T (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 F_Callback(hObject, eventdata, handles)
% hObject handle to F (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 F as text
% str2double(get(hObject,'String')) returns contents of F as a double
% --- Executes during object creation, after setting all properties.
function F_CreateFcn(hObject, eventdata, handles)
% hObject handle to F (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 L_Callback(hObject, eventdata, handles)
% hObject handle to L1 (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 L1 as text
% str2double(get(hObject,'String')) returns contents of L1 as a double
% --- Executes during object creation, after setting all properties.
function L_CreateFcn(hObject, eventdata, handles)
% hObject handle to L1 (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 Mo_Callback(hObject, eventdata, handles)
% hObject handle to Mo (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 Mo as text
% str2double(get(hObject,'String')) returns contents of Mo as a double
% --- Executes during object creation, after setting all properties.
function Mo_CreateFcn(hObject, eventdata, handles)
% hObject handle to Mo (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 Ang_Callback(hObject, eventdata, handles)
% hObject handle to Ang (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 Ang as text
% str2double(get(hObject,'String')) returns contents of Ang as a double
% --- Executes during object creation, after setting all properties.
function Ang_CreateFcn(hObject, eventdata, handles)
% hObject handle to Ang (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 Moy_Callback(hObject, eventdata, handles)
% hObject handle to Moy (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 Moy as text
% str2double(get(hObject,'String')) returns contents of Moy as a double
% --- Executes during object creation, after setting all properties.
function Moy_CreateFcn(hObject, eventdata, handles)
% hObject handle to Moy (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 Angy_Callback(hObject, eventdata, handles)
% hObject handle to Angy (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 Angy as text
% str2double(get(hObject,'String')) returns contents of Angy as a double
% --- Executes during object creation, after setting all properties.
function Angy_CreateFcn(hObject, eventdata, handles)
% hObject handle to Angy (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 R_Callback(hObject, eventdata, handles)
% hObject handle to R (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 R as text
% str2double(get(hObject,'String')) returns contents of R as a double
% --- Executes during object creation, after setting all properties.
function R_CreateFcn(hObject, eventdata, handles)
% hObject handle to R (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 L1_Callback(hObject, eventdata, handles)
% hObject handle to L1 (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 L1 as text
% str2double(get(hObject,'String')) returns contents of L1 as a double
% --- Executes during object creation, after setting all properties.
function L1_CreateFcn(hObject, eventdata, handles)
% hObject handle to L1 (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 G1_Callback(hObject, eventdata, handles)
% hObject handle to G1 (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 G1 as text
% str2double(get(hObject,'String')) returns contents of G1 as a double
% --- Executes during object creation, after setting all properties.
function G1_CreateFcn(hObject, eventdata, handles)
% hObject handle to G1 (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 C_Callback(hObject, eventdata, handles)
% hObject handle to C (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 C as text
% str2double(get(hObject,'String')) returns contents of C as a double
% --- Executes during object creation, after setting all properties.
function C_CreateFcn(hObject, eventdata, handles)
% hObject handle to C (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 Mo2_Callback(hObject, eventdata, handles)
% hObject handle to Mo2 (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 Mo2 as text
% str2double(get(hObject,'String')) returns contents of Mo2 as a double
% --- Executes during object creation, after setting all properties.
function Mo2_CreateFcn(hObject, eventdata, handles)
% hObject handle to Mo2 (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 Ang2_Callback(hObject, eventdata, handles)
% hObject handle to Ang2 (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 Ang2 as text
% str2double(get(hObject,'String')) returns contents of Ang2 as a double
% --- Executes during object creation, after setting all properties.
function Ang2_CreateFcn(hObject, eventdata, handles)
% hObject handle to Ang2 (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 Moy2_Callback(hObject, eventdata, handles)
% hObject handle to Moy2 (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 Moy2 as text
% str2double(get(hObject,'String')) returns contents of Moy2 as a double
% --- Executes during object creation, after setting all properties.
function Moy2_CreateFcn(hObject, eventdata, handles)
% hObject handle to Moy2 (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 Angy2_Callback(hObject, eventdata, handles)
% hObject handle to Angy2 (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 Angy2 as text
% str2double(get(hObject,'String')) returns contents of Angy2 as a double
% --- Executes during object creation, after setting all properties.
function Angy2_CreateFcn(hObject, eventdata, handles)
% hObject handle to Angy2 (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 d1_Callback(hObject, eventdata, handles)
% hObject handle to d1 (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 d1 as text
% str2double(get(hObject,'String')) returns contents of d1 as a double
% --- Executes during object creation, after setting all properties.
function d1_CreateFcn(hObject, eventdata, handles)
% hObject handle to d1 (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 df_Callback(hObject, eventdata, handles)
% hObject handle to df (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 df as text
% str2double(get(hObject,'String')) returns contents of df as a double
% --- Executes during object creation, after setting all properties.
function df_CreateFcn(hObject, eventdata, handles)
% hObject handle to df (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 r1_Callback(hObject, eventdata, handles)
% hObject handle to r1 (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 r1 as text
% str2double(get(hObject,'String')) returns contents of r1 as a double
% --- Executes during object creation, after setting all properties.
function r1_CreateFcn(hObject, eventdata, handles)
% hObject handle to r1 (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 d2_Callback(hObject, eventdata, handles)
% hObject handle to d2 (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 d2 as text
% str2double(get(hObject,'String')) returns contents of d2 as a double
% --- Executes during object creation, after setting all properties.
function d2_CreateFcn(hObject, eventdata, handles)
% hObject handle to d2 (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 df2_Callback(hObject, eventdata, handles)
% hObject handle to df2 (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 df2 as text
% str2double(get(hObject,'String')) returns contents of df2 as a double
% --- Executes during object creation, after setting all properties.
function df2_CreateFcn(hObject, eventdata, handles)
% hObject handle to df2 (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 r2_Callback(hObject, eventdata, handles)
% hObject handle to r2 (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 r2 as text
% str2double(get(hObject,'String')) returns contents of r2 as a double
% --- Executes during object creation, after setting all properties.
function r2_CreateFcn(hObject, eventdata, handles)
% hObject handle to r2 (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 Moh_Callback(hObject, eventdata, handles)
% hObject handle to Moh (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 Moh as text
% str2double(get(hObject,'String')) returns contents of Moh as a double
% --- Executes during object creation, after setting all properties.
function Moh_CreateFcn(hObject, eventdata, handles)
% hObject handle to Moh (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 Angh_Callback(hObject, eventdata, handles)
% hObject handle to Angh (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 Angh as text
% str2double(get(hObject,'String')) returns contents of Angh as a double
% --- Executes during object creation, after setting all properties.
function Angh_CreateFcn(hObject, eventdata, handles)
% hObject handle to Angh (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 Moyh_Callback(hObject, eventdata, handles)
% hObject handle to Moyh (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 Moyh as text
% str2double(get(hObject,'String')) returns contents of Moyh as a double
% --- Executes during object creation, after setting all properties.
function Moyh_CreateFcn(hObject, eventdata, handles)
% hObject handle to Moyh (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 Angyh_Callback(hObject, eventdata, handles)
% hObject handle to Angyh (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 Angyh as text
% str2double(get(hObject,'String')) returns contents of Angyh as a double
% --- Executes during object creation, after setting all properties.
function Angyh_CreateFcn(hObject, eventdata, handles)
% hObject handle to Angyh (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 Moe_Callback(hObject, eventdata, handles)
% hObject handle to Moe (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 Moe as text
% str2double(get(hObject,'String')) returns contents of Moe as a double
% --- Executes during object creation, after setting all properties.
function Moe_CreateFcn(hObject, eventdata, handles)
% hObject handle to Moe (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 Ange_Callback(hObject, eventdata, handles)
% hObject handle to Ange (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 Ange as text
% str2double(get(hObject,'String')) returns contents of Ange as a double
% --- Executes during object creation, after setting all properties.
function Ange_CreateFcn(hObject, eventdata, handles)
% hObject handle to Ange (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 Moye_Callback(hObject, eventdata, handles)
% hObject handle to Moye (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 Moye as text
% str2double(get(hObject,'String')) returns contents of Moye as a double
% --- Executes during object creation, after setting all properties.
function Moye_CreateFcn(hObject, eventdata, handles)
% hObject handle to Moye (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 Angye_Callback(hObject, eventdata, handles)
% hObject handle to Angye (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 Angye as text
% str2double(get(hObject,'String')) returns contents of Angye as a double
% --- Executes during object creation, after setting all properties.
function Angye_CreateFcn(hObject, eventdata, handles)
% hObject handle to Angye (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 dmgh_Callback(hObject, eventdata, handles)
% hObject handle to dmgh (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 dmgh as text
% str2double(get(hObject,'String')) returns contents of dmgh as a double
% --- Executes during object creation, after setting all properties.
function dmgh_CreateFcn(hObject, eventdata, handles)
% hObject handle to dmgh (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 rmgh_Callback(hObject, eventdata, handles)
% hObject handle to rmgh (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 rmgh as text
% str2double(get(hObject,'String')) returns contents of rmgh as a double
% --- Executes during object creation, after setting all properties.
function rmgh_CreateFcn(hObject, eventdata, handles)
% hObject handle to rmgh (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 dmge_Callback(hObject, eventdata, handles)
% hObject handle to dmge (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 dmge as text
% str2double(get(hObject,'String')) returns contents of dmge as a double
% --- Executes during object creation, after setting all properties.
function dmge_CreateFcn(hObject, eventdata, handles)
% hObject handle to dmge (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 rmge_Callback(hObject, eventdata, handles)
% hObject handle to rmge (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 rmge as text
% str2double(get(hObject,'String')) returns contents of rmge as a double
% --- Executes during object creation, after setting all properties.
function rmge_CreateFcn(hObject, eventdata, handles)
% hObject handle to rmge (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 ps1.
function ps1_Callback(hObject, eventdata, handles)
% hObject handle to ps1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
close(ejercicio2);
ejercicio3
% --- Executes on button press in calcular.
function calcular_Callback(hObject, eventdata, handles)
% hObject handle to calcular (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
%Para calcular Z y Y por los parámetros eléctricos ingresados.
T=str2double(get(handles.T,'String'));
F=str2double(get(handles.F,'String'));
L=str2double(get(handles.L,'String'));
Mo=str2double(get(handles.Mo,'String'));
Ang=str2double(get(handles.Ang,'String'));
Moy=str2double(get(handles.Moy,'String'));
Angy=str2double(get(handles.Angy,'String'));
R=str2double(get(handles.R,'String'));
L1=str2double(get(handles.L1,'String'));
G=str2double(get(handles.G,'String'));
C=str2double(get(handles.C,'String'));
Mo2=str2double(get(handles.Mo2,'String'));
Ang2=str2double(get(handles.Ang2,'String'));
Moy2=str2double(get(handles.Moy2,'String'));
Angy2=str2double(get(handles.Angy2,'String'));
% --- Executes on button press in limpiar.
function limpiar_Callback(hObject, eventdata, handles)
% hObject handle to limpiar (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
set(handles.T,'String',"");
set(handles.F,'String',"");
set(handles.L,'String',"");
%Método directo para ingreso de Z y Y.
set(handles.Mo,'String',"");
set(handles.Ang,'String',"");
set(handles.Moy,'String',"");
set(handles.Angy,'String',"");
%Ingreso por medio de parámetros eléctricos para Z y Y
set(handles.R,'String',"");
set(handles.L1,'String',"");
set(handles.G,'String',"");
set(handles.C,'String',"");
set(handles.Mo2,'String',"");
set(handles.Ang2,'String',"");
set(handles.Moy2,'String',"");
set(handles.Angy2,'String',"");
%Ingreso por medio de la configuración de línea para Z y Y.
set(handles.d1,'String',"");
set(handles.df,'String',"");
set(handles.r1,'String',"");
set(handles.d2,'String',"");
set(handles.df2,'String',"");
set(handles.r2,'String',"");
set(handles.Moh,'String',"");
set(handles.Angh,'String',"");
set(handles.Moyh,'String',"");
set(handles.Angyh,'String',"");
set(handles.Moe,'String',"");
set(handles.Ange,'String',"");
set(handles.Moye,'String',"");
set(handles.Angye,'String',"");
set(handles.dmgh,'String',"");
set(handles.rmgh,'String',"");
set(handles.dmge,'String',"");
set(handles.rmge,'String',"");
%Datos ingresados
set(handles.T,'String',"");
set(handles.F,'String',"");
set(handles.L,'String',"");
set(handles.Mo,'String',"");
set(handles.Ang,'String',"");
set(handles.Moy,'String',"");
set(handles.Angy,'String',"");
% --- Executes on button press in salir.
function salir_Callback(hObject, eventdata, handles)
% hObject handle to salir (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
close
function G_Callback(hObject, eventdata, handles)
% hObject handle to G (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 G as text
% str2double(get(hObject,'String')) returns contents of G as a double
% --- Executes during object creation, after setting all properties.
function G_CreateFcn(hObject, eventdata, handles)
% hObject handle to G (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 varargout = ejercicio2(varargin)
% EJERCICIO2 MATLAB code for ejercicio2.fig
% EJERCICIO2, by itself, creates a new EJERCICIO2 or raises the existing
% singleton*.
%
% H = EJERCICIO2 returns the handle to a new EJERCICIO2 or the handle to
% the existing singleton*.
%
% EJERCICIO2('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in EJERCICIO2.M with the given input arguments.
%
% EJERCICIO2('Property','Value',...) creates a new EJERCICIO2 or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before ejercicio2_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to ejercicio2_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 ejercicio2
% Last Modified by GUIDE v2.5 29-Jun-2020 15:47:27
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @ejercicio2_OpeningFcn, ...
'gui_OutputFcn', @ejercicio2_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 ejercicio2 is made visible.
function ejercicio2_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 ejercicio2 (see VARARGIN)
a=imread('1.1.jpg');
image(a);
axis off
% Choose default command line output for ejercicio2
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes ejercicio2 wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = ejercicio2_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 T_Callback(hObject, eventdata, handles)
% hObject handle to T (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 T as text
% str2double(get(hObject,'String')) returns contents of T as a double
% --- Executes during object creation, after setting all properties.
function T_CreateFcn(hObject, eventdata, handles)
% hObject handle to T (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 F_Callback(hObject, eventdata, handles)
% hObject handle to F (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 F as text
% str2double(get(hObject,'String')) returns contents of F as a double
% --- Executes during object creation, after setting all properties.
function F_CreateFcn(hObject, eventdata, handles)
% hObject handle to F (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 L_Callback(hObject, eventdata, handles)
% hObject handle to L1 (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 L1 as text
% str2double(get(hObject,'String')) returns contents of L1 as a double
% --- Executes during object creation, after setting all properties.
function L_CreateFcn(hObject, eventdata, handles)
% hObject handle to L1 (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 Mo_Callback(hObject, eventdata, handles)
% hObject handle to Mo (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 Mo as text
% str2double(get(hObject,'String')) returns contents of Mo as a double
% --- Executes during object creation, after setting all properties.
function Mo_CreateFcn(hObject, eventdata, handles)
% hObject handle to Mo (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 Ang_Callback(hObject, eventdata, handles)
% hObject handle to Ang (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 Ang as text
% str2double(get(hObject,'String')) returns contents of Ang as a double
% --- Executes during object creation, after setting all properties.
function Ang_CreateFcn(hObject, eventdata, handles)
% hObject handle to Ang (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 Moy_Callback(hObject, eventdata, handles)
% hObject handle to Moy (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 Moy as text
% str2double(get(hObject,'String')) returns contents of Moy as a double
% --- Executes during object creation, after setting all properties.
function Moy_CreateFcn(hObject, eventdata, handles)
% hObject handle to Moy (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 Angy_Callback(hObject, eventdata, handles)
% hObject handle to Angy (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 Angy as text
% str2double(get(hObject,'String')) returns contents of Angy as a double
% --- Executes during object creation, after setting all properties.
function Angy_CreateFcn(hObject, eventdata, handles)
% hObject handle to Angy (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 R_Callback(hObject, eventdata, handles)
% hObject handle to R (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 R as text
% str2double(get(hObject,'String')) returns contents of R as a double
% --- Executes during object creation, after setting all properties.
function R_CreateFcn(hObject, eventdata, handles)
% hObject handle to R (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 L1_Callback(hObject, eventdata, handles)
% hObject handle to L1 (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 L1 as text
% str2double(get(hObject,'String')) returns contents of L1 as a double
% --- Executes during object creation, after setting all properties.
function L1_CreateFcn(hObject, eventdata, handles)
% hObject handle to L1 (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 G1_Callback(hObject, eventdata, handles)
% hObject handle to G1 (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 G1 as text
% str2double(get(hObject,'String')) returns contents of G1 as a double
% --- Executes during object creation, after setting all properties.
function G1_CreateFcn(hObject, eventdata, handles)
% hObject handle to G1 (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 C_Callback(hObject, eventdata, handles)
% hObject handle to C (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 C as text
% str2double(get(hObject,'String')) returns contents of C as a double
% --- Executes during object creation, after setting all properties.
function C_CreateFcn(hObject, eventdata, handles)
% hObject handle to C (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 Mo2_Callback(hObject, eventdata, handles)
% hObject handle to Mo2 (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 Mo2 as text
% str2double(get(hObject,'String')) returns contents of Mo2 as a double
% --- Executes during object creation, after setting all properties.
function Mo2_CreateFcn(hObject, eventdata, handles)
% hObject handle to Mo2 (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 Ang2_Callback(hObject, eventdata, handles)
% hObject handle to Ang2 (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 Ang2 as text
% str2double(get(hObject,'String')) returns contents of Ang2 as a double
% --- Executes during object creation, after setting all properties.
function Ang2_CreateFcn(hObject, eventdata, handles)
% hObject handle to Ang2 (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 Moy2_Callback(hObject, eventdata, handles)
% hObject handle to Moy2 (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 Moy2 as text
% str2double(get(hObject,'String')) returns contents of Moy2 as a double
% --- Executes during object creation, after setting all properties.
function Moy2_CreateFcn(hObject, eventdata, handles)
% hObject handle to Moy2 (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 Angy2_Callback(hObject, eventdata, handles)
% hObject handle to Angy2 (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 Angy2 as text
% str2double(get(hObject,'String')) returns contents of Angy2 as a double
% --- Executes during object creation, after setting all properties.
function Angy2_CreateFcn(hObject, eventdata, handles)
% hObject handle to Angy2 (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 d1_Callback(hObject, eventdata, handles)
% hObject handle to d1 (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 d1 as text
% str2double(get(hObject,'String')) returns contents of d1 as a double
% --- Executes during object creation, after setting all properties.
function d1_CreateFcn(hObject, eventdata, handles)
% hObject handle to d1 (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 df_Callback(hObject, eventdata, handles)
% hObject handle to df (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 df as text
% str2double(get(hObject,'String')) returns contents of df as a double
% --- Executes during object creation, after setting all properties.
function df_CreateFcn(hObject, eventdata, handles)
% hObject handle to df (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 r1_Callback(hObject, eventdata, handles)
% hObject handle to r1 (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 r1 as text
% str2double(get(hObject,'String')) returns contents of r1 as a double
% --- Executes during object creation, after setting all properties.
function r1_CreateFcn(hObject, eventdata, handles)
% hObject handle to r1 (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 d2_Callback(hObject, eventdata, handles)
% hObject handle to d2 (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 d2 as text
% str2double(get(hObject,'String')) returns contents of d2 as a double
% --- Executes during object creation, after setting all properties.
function d2_CreateFcn(hObject, eventdata, handles)
% hObject handle to d2 (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 df2_Callback(hObject, eventdata, handles)
% hObject handle to df2 (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 df2 as text
% str2double(get(hObject,'String')) returns contents of df2 as a double
% --- Executes during object creation, after setting all properties.
function df2_CreateFcn(hObject, eventdata, handles)
% hObject handle to df2 (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 r2_Callback(hObject, eventdata, handles)
% hObject handle to r2 (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 r2 as text
% str2double(get(hObject,'String')) returns contents of r2 as a double
% --- Executes during object creation, after setting all properties.
function r2_CreateFcn(hObject, eventdata, handles)
% hObject handle to r2 (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 Moh_Callback(hObject, eventdata, handles)
% hObject handle to Moh (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 Moh as text
% str2double(get(hObject,'String')) returns contents of Moh as a double
% --- Executes during object creation, after setting all properties.
function Moh_CreateFcn(hObject, eventdata, handles)
% hObject handle to Moh (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 Angh_Callback(hObject, eventdata, handles)
% hObject handle to Angh (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 Angh as text
% str2double(get(hObject,'String')) returns contents of Angh as a double
% --- Executes during object creation, after setting all properties.
function Angh_CreateFcn(hObject, eventdata, handles)
% hObject handle to Angh (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 Moyh_Callback(hObject, eventdata, handles)
% hObject handle to Moyh (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 Moyh as text
% str2double(get(hObject,'String')) returns contents of Moyh as a double
% --- Executes during object creation, after setting all properties.
function Moyh_CreateFcn(hObject, eventdata, handles)
% hObject handle to Moyh (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 Angyh_Callback(hObject, eventdata, handles)
% hObject handle to Angyh (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 Angyh as text
% str2double(get(hObject,'String')) returns contents of Angyh as a double
% --- Executes during object creation, after setting all properties.
function Angyh_CreateFcn(hObject, eventdata, handles)
% hObject handle to Angyh (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 Moe_Callback(hObject, eventdata, handles)
% hObject handle to Moe (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 Moe as text
% str2double(get(hObject,'String')) returns contents of Moe as a double
% --- Executes during object creation, after setting all properties.
function Moe_CreateFcn(hObject, eventdata, handles)
% hObject handle to Moe (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 Ange_Callback(hObject, eventdata, handles)
% hObject handle to Ange (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 Ange as text
% str2double(get(hObject,'String')) returns contents of Ange as a double
% --- Executes during object creation, after setting all properties.
function Ange_CreateFcn(hObject, eventdata, handles)
% hObject handle to Ange (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 Moye_Callback(hObject, eventdata, handles)
% hObject handle to Moye (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 Moye as text
% str2double(get(hObject,'String')) returns contents of Moye as a double
% --- Executes during object creation, after setting all properties.
function Moye_CreateFcn(hObject, eventdata, handles)
% hObject handle to Moye (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 Angye_Callback(hObject, eventdata, handles)
% hObject handle to Angye (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 Angye as text
% str2double(get(hObject,'String')) returns contents of Angye as a double
% --- Executes during object creation, after setting all properties.
function Angye_CreateFcn(hObject, eventdata, handles)
% hObject handle to Angye (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 dmgh_Callback(hObject, eventdata, handles)
% hObject handle to dmgh (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 dmgh as text
% str2double(get(hObject,'String')) returns contents of dmgh as a double
% --- Executes during object creation, after setting all properties.
function dmgh_CreateFcn(hObject, eventdata, handles)
% hObject handle to dmgh (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 rmgh_Callback(hObject, eventdata, handles)
% hObject handle to rmgh (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 rmgh as text
% str2double(get(hObject,'String')) returns contents of rmgh as a double
% --- Executes during object creation, after setting all properties.
function rmgh_CreateFcn(hObject, eventdata, handles)
% hObject handle to rmgh (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 dmge_Callback(hObject, eventdata, handles)
% hObject handle to dmge (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 dmge as text
% str2double(get(hObject,'String')) returns contents of dmge as a double
% --- Executes during object creation, after setting all properties.
function dmge_CreateFcn(hObject, eventdata, handles)
% hObject handle to dmge (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 rmge_Callback(hObject, eventdata, handles)
% hObject handle to rmge (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 rmge as text
% str2double(get(hObject,'String')) returns contents of rmge as a double
% --- Executes during object creation, after setting all properties.
function rmge_CreateFcn(hObject, eventdata, handles)
% hObject handle to rmge (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 ps1.
function ps1_Callback(hObject, eventdata, handles)
% hObject handle to ps1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
close(ejercicio2);
ejercicio3
% --- Executes on button press in calcular.
function calcular_Callback(hObject, eventdata, handles)
% hObject handle to calcular (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
%Para calcular Z y Y por los parámetros eléctricos ingresados.
T=str2double(get(handles.T,'String'));
F=str2double(get(handles.F,'String'));
L=str2double(get(handles.L,'String'));
Mo=str2double(get(handles.Mo,'String'));
Ang=str2double(get(handles.Ang,'String'));
Moy=str2double(get(handles.Moy,'String'));
Angy=str2double(get(handles.Angy,'String'));
R=str2double(get(handles.R,'String'));
L1=str2double(get(handles.L1,'String'));
G=str2double(get(handles.G,'String'));
C=str2double(get(handles.C,'String'));
Mo2=str2double(get(handles.Mo2,'String'));
Ang2=str2double(get(handles.Ang2,'String'));
Moy2=str2double(get(handles.Moy2,'String'));
Angy2=str2double(get(handles.Angy2,'String'));
R1=R;
jw=(L1*2*pi*60);
Zs=(R1+jw);
Z1=complex(R1,jw);
Mo2=[abs(Z1), (angle(Z1)*180/pi)];
set(handles.Mo2,'String',Mo2);
% --- Executes on button press in limpiar.
function limpiar_Callback(hObject, eventdata, handles)
% hObject handle to limpiar (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
set(handles.T,'String',"");
set(handles.F,'String',"");
set(handles.L,'String',"");
%Método directo para ingreso de Z y Y.
set(handles.Mo,'String',"");
set(handles.Ang,'String',"");
set(handles.Moy,'String',"");
set(handles.Angy,'String',"");
%Ingreso por medio de parámetros eléctricos para Z y Y
set(handles.R,'String',"");
set(handles.L1,'String',"");
set(handles.G,'String',"");
set(handles.C,'String',"");
set(handles.Mo2,'String',"");
set(handles.Ang2,'String',"");
set(handles.Moy2,'String',"");
set(handles.Angy2,'String',"");
%Ingreso por medio de la configuración de línea para Z y Y.
set(handles.d1,'String',"");
set(handles.df,'String',"");
set(handles.r1,'String',"");
set(handles.d2,'String',"");
set(handles.df2,'String',"");
set(handles.r2,'String',"");
set(handles.Moh,'String',"");
set(handles.Angh,'String',"");
set(handles.Moyh,'String',"");
set(handles.Angyh,'String',"");
set(handles.Moe,'String',"");
set(handles.Ange,'String',"");
set(handles.Moye,'String',"");
set(handles.Angye,'String',"");
set(handles.dmgh,'String',"");
set(handles.rmgh,'String',"");
set(handles.dmge,'String',"");
set(handles.rmge,'String',"");
%Datos ingresados
set(handles.T,'String',"");
set(handles.F,'String',"");
set(handles.L,'String',"");
set(handles.Mo,'String',"");
set(handles.Ang,'String',"");
set(handles.Moy,'String',"");
set(handles.Angy,'String',"");
% --- Executes on button press in salir.
function salir_Callback(hObject, eventdata, handles)
% hObject handle to salir (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
close
function G_Callback(hObject, eventdata, handles)
% hObject handle to G (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 G as text
% str2double(get(hObject,'String')) returns contents of G as a double
% --- Executes during object creation, after setting all properties.
function G_CreateFcn(hObject, eventdata, handles)
% hObject handle to G (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 calcular_Callback(hObject, eventdata, handles)
% hObject handle to calcular (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
%Para calcular Z y Y por los parámetros eléctricos ingresados.
T=str2double(get(handles.T,'String'));
F=str2double(get(handles.F,'String'));
L=str2double(get(handles.L,'String'));
Mo=str2double(get(handles.Mo,'String'));
Ang=str2double(get(handles.Ang,'String'));
Moy=str2double(get(handles.Moy,'String'));
Angy=str2double(get(handles.Angy,'String'));
R=str2double(get(handles.R,'String'));
L1=str2double(get(handles.L1,'String'));
G=str2double(get(handles.G,'String'));
C=str2double(get(handles.C,'String'));
Mo2=str2double(get(handles.Mo2,'String'));
Ang2=str2double(get(handles.Ang2,'String'));
Moy2=str2double(get(handles.Moy2,'String'));
Angy2=str2double(get(handles.Angy2,'String'));
ra=F;
rb=(2*ra);
Mo=rb
set(handles.Mo,'Max',2)
set(handles.Mo,'string',Mo);