Date post: | 24-Dec-2015 |
Category: |
Documents |
Upload: | catalinasanchez |
View: | 212 times |
Download: | 0 times |
function varargout = SYS_sanchezedy_murillocarolina(varargin)
% SYS_SANCHEZEDY_MURILLOCAROLINA MATLAB code for SYS_sanchezedy_murillocarolina.fig
% SYS_SANCHEZEDY_MURILLOCAROLINA, by itself, creates a new SYS_SANCHEZEDY_MURILLOCAROLINA or raises the existing
% singleton*.
%
% H = SYS_SANCHEZEDY_MURILLOCAROLINA returns the handle to a new SYS_SANCHEZEDY_MURILLOCAROLINA or the handle to
% the existing singleton*.
%
% SYS_SANCHEZEDY_MURILLOCAROLINA('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in SYS_SANCHEZEDY_MURILLOCAROLINA.M with the given input arguments.
%
% SYS_SANCHEZEDY_MURILLOCAROLINA('Property','Value',...) creates a new SYS_SANCHEZEDY_MURILLOCAROLINA or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before SYS_sanchezedy_murillocarolina_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to SYS_sanchezedy_murillocarolina_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 SYS_sanchezedy_murillocarolina
% Last Modified by GUIDE v2.5 13-Oct-2014 13:05:26
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @SYS_sanchezedy_murillocarolina_OpeningFcn, ...
'gui_OutputFcn', @SYS_sanchezedy_murillocarolina_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 SYS_sanchezedy_murillocarolina is made visible.
function SYS_sanchezedy_murillocarolina_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 SYS_sanchezedy_murillocarolina (see VARARGIN)
% Choose default command line output for SYS_sanchezedy_murillocarolina
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes SYS_sanchezedy_murillocarolina wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = SYS_sanchezedy_murillocarolina_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;
% --- Executes on selection change in tipse.
function tipse_Callback(hObject, eventdata, handles)
% hObject handle to tipse (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: contents = cellstr(get(hObject,'String')) returns tipse contents as cell array
% contents{get(hObject,'Value')} returns selected item from tipse
% --- Executes during object creation, after setting all properties.
function tipse_CreateFcn(hObject, eventdata, handles)
% hObject handle to tipse (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 on selection change in tiptime.
function tiptime_Callback(hObject, eventdata, handles)
% hObject handle to tiptime (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: contents = cellstr(get(hObject,'String')) returns tiptime contents as cell array
% contents{get(hObject,'Value')} returns selected item from tiptime
global ttime %Se crea una variable global definiendo tiempo
tt1=get(hObject,'Value');
switch tt1
case 1
ttime=1; % Tiempo continuo
case 2
ttime=2; % Tiempo Discreto
end
% --- Executes during object creation, after setting all properties.
function tiptime_CreateFcn(hObject, eventdata, handles)
% hObject handle to tiptime (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
function Ti_Callback(hObject, eventdata, handles)
% hObject handle to Ti (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 Ti as text
% str2double(get(hObject,'String')) returns contents of Ti as a double
% --- Executes during object creation, after setting all properties.
function Ti_CreateFcn(hObject, eventdata, handles)
% hObject handle to Ti (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 Tf_Callback(hObject, eventdata, handles)
% hObject handle to Tf (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 Tf as text
% str2double(get(hObject,'String')) returns contents of Tf as a double
% --- Executes during object creation, after setting all properties.
function Tf_CreateFcn(hObject, eventdata, handles)
% hObject handle to Tf (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 Tm_Callback(hObject, eventdata, handles)
% hObject handle to Tm (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 Tm as text
% str2double(get(hObject,'String')) returns contents of Tm as a double
% --- Executes during object creation, after setting all properties.
function Tm_CreateFcn(hObject, eventdata, handles)
% hObject handle to Tm (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 Des_Callback(hObject, eventdata, handles)
% hObject handle to Des (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 Des as text
% str2double(get(hObject,'String')) returns contents of Des as a double
% --- Executes during object creation, after setting all properties.
function Des_CreateFcn(hObject, eventdata, handles)
% hObject handle to Des (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 Ai_Callback(hObject, eventdata, handles)
% hObject handle to Ai (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 Ai as text
% str2double(get(hObject,'String')) returns contents of Ai as a double
% --- Executes during object creation, after setting all properties.
function Ai_CreateFcn(hObject, eventdata, handles)
% hObject handle to Ai (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 Ar_Callback(hObject, eventdata, handles)
% hObject handle to Ar (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 Ar as text
% str2double(get(hObject,'String')) returns contents of Ar as a double
% --- Executes during object creation, after setting all properties.
function Ar_CreateFcn(hObject, eventdata, handles)
% hObject handle to Ar (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 Ae_Callback(hObject, eventdata, handles)
% hObject handle to Ae (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 Ae as text
% str2double(get(hObject,'String')) returns contents of Ae as a double
% --- Executes during object creation, after setting all properties.
function Ae_CreateFcn(hObject, eventdata, handles)
% hObject handle to Ae (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 Esc.
function Esc_Callback(hObject, eventdata, handles)
% hObject handle to Esc (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global Ae1
global u
global T
global N
global ttime %llamamos a la variable global
Ae1=str2num(char(get(handles.Ae,'string'))); %Amplitud del escalon
Ti1=str2num(char(get(handles.Ti,'string'))); %Tiempo inicial
Tf1=str2num(char(get(handles.Tf,'string'))); %Tiempo final
Tm1=str2num(char(get(handles.Tm,'string'))); %Tiempo de muestreo
Des1=str2num(char(get(handles.des,'string')));
T=Ti1+Des1:Tm1:Tf1+Des1; %Vector Tiempo continuo
N=Ti1+Des1:Tf1+Des1; %Vector tiempo discreto
if (Des1>10 ||Des1<-10)
msgbox('ingrese un valor entre -10 y 10 en el desplazamiento y grafique nuevamente')
return
end
if ttime==1 %Selección de tiempo continuo para el escalon
u=Ae1.*heaviside(T); %asigna a u para graficar el escalon continuo
axes(handles.axes1)
plot(T,u),xlabel('tiempo [s]'), ylabel('Amplitud');
elseif ttime==2 %Selección de tiempo discreto para el escalon
u=Ae1.*heaviside(N); %asigna a u para graficar escalon discreto
axes(handles.axes1)
stem(N,u),xlabel('tiempo [s]'), ylabel('Amplitud');
end
% --- Executes on button press in Ramp.
function Ramp_Callback(hObject, eventdata, handles)
% hObject handle to Ramp (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global r
global T
global N
global ttime
global Ar1
Ar1=str2num(char(get(handles.Ar,'string'))); %Amplitud de la rampa
Ti1=str2num(char(get(handles.Ti,'string'))); %Tiempo inicial
Tf1=str2num(char(get(handles.Tf,'string'))); %Tiempo final
Tm1=str2num(char(get(handles.Tm,'string'))); %Tiempo de muestreo
Des1=str2num(char(get(handles.des,'string')));
T=Ti1+Des1:Tm1:Tf1+Des1; %Vector Tiempo continuo
N=Ti1+Des1:Tf1+Des1; %Vector tiempo discreto
if (Des1>10 ||Des1<-10)
msgbox('ingrese un valor entre -10 y 10 en el desplazamiento y grafique nuevamente')
return
end
if ttime==1 %Selección de tiempo continuo para la rampa
r=Ar1*(T).*heaviside(T); %asigna a r para graficar la rampa continuo
axes(handles.axes1)
plot(T,r),xlabel('tiempo [s]'), ylabel('Amplitud');
elseif ttime==2 %Selección de tiempo discreto para la rampa
r=Ar1*(N).*heaviside(N); %asigna a r para graficar la rampa discreto
axes(handles.axes1)
stem(N,r),xlabel('tiempo [s]'), ylabel('Amplitud'); %muestra la grafica discreta
end
% --- Executes on button press in imp.
function imp_Callback(hObject, eventdata, handles)
% hObject handle to imp (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global i
global T
global N
global ttime
global Ai1
Ai1=str2num(char(get(handles.Ai,'string'))); %Amplitud del impulso
Ti1=str2num(char(get(handles.Ti,'string'))); %Tiempo inicial
Tf1=str2num(char(get(handles.Tf,'string'))); %Tiempo final
Tm1=str2num(char(get(handles.Tm,'string'))); %Tiempo de muestreo
Des1=str2num(char(get(handles.des,'string')));
T=Ti1+Des1:Tm1:Tf1+Des1; %Vector Tiempo continuo
N=Ti1+Des1:Tf1+Des1; %Vector tiempo discreto
if (Des1>10 ||Des1<-10)
msgbox('ingrese un valor entre -10 y 10 en el desplazamiento y grafique nuevamente')
return
end
if ttime==1 %Selección de tiempo continuo para el impulso
Timp=T; %Se realiza cambio de variable para no presentar in.*eniente al graficar
i=Ai1*double(Timp == 0); %asigna a i para graficar el impulso continuo
axes(handles.axes1)
plot(T,i),xlabel('tiempo [s]'), ylabel('Amplitud');
elseif ttime==2 %Selección de tiempo discreto para el impulso
Tii=abs(Ti1+Des1); %Se realiza cambio de variable para no presentar in.*eniente al graficar y en valor absoluto
Tif=abs(Tf1+Des1); %Se realiza cambio de variable para no presentar in.*eniente al graficar y en valor absoluto
i=Ai1.*[zeros(1,Tii),1,zeros(1,Tif)]; %asigna a i para graficar el impulso discreto
axes(handles.axes1)
stem(N,i),xlabel('tiempo [s]'), ylabel('Amplitud'); %muestra la grafica discreta
end
function As_Callback(hObject, eventdata, handles)
% hObject handle to As (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 As as text
% str2double(get(hObject,'String')) returns contents of As as a double
% --- Executes during object creation, after setting all properties.
function As_CreateFcn(hObject, eventdata, handles)
% hObject handle to As (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 Fs_Callback(hObject, eventdata, handles)
% hObject handle to Fs (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 Fs as text
% str2double(get(hObject,'String')) returns contents of Fs as a double
% --- Executes during object creation, after setting all properties.
function Fs_CreateFcn(hObject, eventdata, handles)
% hObject handle to Fs (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 Fas_Callback(hObject, eventdata, handles)
% hObject handle to Fas (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 Fas as text
% str2double(get(hObject,'String')) returns contents of Fas as a double
% --- Executes during object creation, after setting all properties.
function Fas_CreateFcn(hObject, eventdata, handles)
% hObject handle to Fas (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 sen.
function sen_Callback(hObject, eventdata, handles)
% hObject handle to sen (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global s
global T
global ttime
As1=str2num(char(get(handles.As,'string'))); %Amplitud de la senoidal
Fs1=str2num(char(get(handles.Fs,'string'))); %Frecuencia de la senoidal
Fas1=str2num(char(get(handles.Fas,'string'))); %Fase de la senoidal
Ti1=str2num(char(get(handles.Ti,'string'))); %Tiempo inicial
Tf1=str2num(char(get(handles.Tf,'string'))); %Tiempo final
Tm1=str2num(char(get(handles.Tm,'string'))); %Tiempo de muestreo
Des1=str2num(char(get(handles.des,'string')));
T=Ti1+Des1:Tm1:Tf1+Des1; %Vector Tiempo continuo
if (Des1>10 ||Des1<-10)
msgbox('ingrese un valor entre -10 y 10 en el desplazamiento y grafique nuevamente')
return
end
if ttime==1 %Selección de tiempo continuo para la senoidal
s=As1*sin((2*pi*Fs1*T)+Fas1); %asigna a s para graficar la senoidal continua
axes(handles.axes2)
plot(T,s),xlabel('tiempo [s]'), ylabel('Amplitud');
elseif ttime==2 %Selección de tiempo discreto para
s=As1*sin((2*pi*Fs1*T)+Fas1); %asigna a s para graficar la senoidal discreta
axes(handles.axes2)
stem(T,s),xlabel('tiempo [s]'), ylabel('Amplitud');
end
function At_Callback(hObject, eventdata, handles)
% hObject handle to At (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 At as text
% str2double(get(hObject,'String')) returns contents of At as a double
% --- Executes during object creation, after setting all properties.
function At_CreateFcn(hObject, eventdata, handles)
% hObject handle to At (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 Ft_Callback(hObject, eventdata, handles)
% hObject handle to Ft (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 Ft as text
% str2double(get(hObject,'String')) returns contents of Ft as a double
% --- Executes during object creation, after setting all properties.
function Ft_CreateFcn(hObject, eventdata, handles)
% hObject handle to Ft (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 Wd_Callback(hObject, eventdata, handles)
% hObject handle to Wd (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 Wd as text
% str2double(get(hObject,'String')) returns contents of Wd as a double
% --- Executes during object creation, after setting all properties.
function Wd_CreateFcn(hObject, eventdata, handles)
% hObject handle to Wd (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 triang.
function triang_Callback(hObject, eventdata, handles)
% hObject handle to triang (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global tri
global T
global ttime
At1=str2num(char(get(handles.At,'string'))); %Amplitud de la diente-sierra
Ft1=str2num(char(get(handles.Ft,'string'))); %Frecuencia de la diente-sierra
Wd1=str2num(char(get(handles.Wd,'string'))); %Ancho de la diente-sierra
Ti1=str2num(char(get(handles.Ti,'string'))); %Tiempo inicial
Tf1=str2num(char(get(handles.Tf,'string'))); %Tiempo final
Tm1=str2num(char(get(handles.Tm,'string'))); %Tiempo de muestreo
Des1=str2num(char(get(handles.des,'string')));
T=Ti1+Des1:Tm1:Tf1+Des1; %Vector Tiempo continuo
if (Des1>10 ||Des1<-10)
msgbox('ingrese un valor entre -10 y 10 en el desplazamiento y grafique nuevamente')
return
end
if (Wd1>1 ||Wd1<0)
msgbox('ingrese un valor entre 0 y 1 en el width y grafique nuevamente')
return
end
if ttime==1 %Selección de tiempo continuo para la diente-sierra
tri=At1*sawtooth((2*pi*Ft1*T),Wd1); %asigna a tri para graficar la diente-sierra continua
axes(handles.axes2)
plot(T,tri),xlabel('tiempo [s]'), ylabel('Amplitud');
elseif ttime==2 %Selección de tiempo discreto para la diente-sierra
tri=At1*sawtooth((2*pi*Ft1*T),Wd1); %asigna a tri para graficar la diente-sierra discreta
axes(handles.axes2)
stem(T,tri),xlabel('tiempo [s]'), ylabel('Amplitud');
end
function Ct_Callback(hObject, eventdata, handles)
% hObject handle to Ct (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 Ct as text
% str2double(get(hObject,'String')) returns contents of Ct as a double
% --- Executes during object creation, after setting all properties.
function Ct_CreateFcn(hObject, eventdata, handles)
% hObject handle to Ct (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 Ac_Callback(hObject, eventdata, handles)
% hObject handle to Ac (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 Ac as text
% str2double(get(hObject,'String')) returns contents of Ac as a double
% --- Executes during object creation, after setting all properties.
function Ac_CreateFcn(hObject, eventdata, handles)
% hObject handle to Ac (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 Fc_Callback(hObject, eventdata, handles)
% hObject handle to Fc (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 Fc as text
% str2double(get(hObject,'String')) returns contents of Fc as a double
% --- Executes during object creation, after setting all properties.
function Fc_CreateFcn(hObject, eventdata, handles)
% hObject handle to Fc (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 cuad.
function cuad_Callback(hObject, eventdata, handles)
% hObject handle to cuad (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global c
global T
global ttime
Ac1=str2num(char(get(handles.Ac,'string'))); %Amplitud de la cuadrada
Fc1=str2num(char(get(handles.Fc,'string'))); %Frecuencia de cuadrada
Ct1=str2num(char(get(handles.Ct,'string'))); %Ciclo de trabajo de la cuadrada
Ti1=str2num(char(get(handles.Ti,'string'))); %Tiempo inicial
Tf1=str2num(char(get(handles.Tf,'string'))); %Tiempo final
Tm1=str2num(char(get(handles.Tm,'string'))); %Tiempo de muestreo
Des1=str2num(char(get(handles.des,'string')));
T=Ti1+Des1:Tm1:Tf1+Des1; %Vector Tiempo continuo
if (Des1>10 ||Des1<-10)
msgbox('ingrese un valor entre -10 y 10 en el desplazamiento y grafique nuevamente')
return
end
if ttime==1 %Selección de tiempo continuo para la cuadrada
c=Ac1*square((2*pi*Fc1*T),Ct1); %asigna a c para graficar la cuadrada continua
axes(handles.axes2)
plot(T,c),xlabel('tiempo [s]'), ylabel('Amplitud');
elseif ttime==2 %Selección de tiempo discreto para la cuadrada
c=Ac1*square((2*pi*Fc1*T),Ct1); %asigna a c para graficar la cuadrada discreta
axes(handles.axes2)
stem(T,c),xlabel('tiempo [s]'), ylabel('Amplitud');
end
function Asp_Callback(hObject, eventdata, handles)
% hObject handle to Asp (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 Asp as text
% str2double(get(hObject,'String')) returns contents of Asp as a double
% --- Executes during object creation, after setting all properties.
function Asp_CreateFcn(hObject, eventdata, handles)
% hObject handle to Asp (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 Aap_Callback(hObject, eventdata, handles)
% hObject handle to Aap (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 Aap as text
% str2double(get(hObject,'String')) returns contents of Aap as a double
% --- Executes during object creation, after setting all properties.
function Aap_CreateFcn(hObject, eventdata, handles)
% hObject handle to Aap (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 pulsen.
function pulsen_Callback(hObject, eventdata, handles)
% hObject handle to pulsen (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global sp
global T
global ttime
Asp1=str2num(char(get(handles.Asp,'string'))); %Amplitud del pulso senoidal
Aap1=str2num(char(get(handles.Aap,'string'))); %Ancho del pulso senoidal
Ti1=str2num(char(get(handles.Ti,'string'))); %Tiempo inicial
Tf1=str2num(char(get(handles.Tf,'string'))); %Tiempo final
Tm1=str2num(char(get(handles.Tm,'string'))); %Tiempo de muestreo
T=Ti1:Tm1:Tf1; %Vector Tiempo
Des1=str2num(char(get(handles.des,'string')));
T=Ti1+Des1:Tm1:Tf1+Des1; %Vector Tiempo continuo
if (Des1>10 ||Des1<-10)
msgbox('ingrese un valor entre -10 y 10 en el desplazamiento y grafique nuevamente')
return
end
if ttime==1 %Selección de tiempo continuo para el pulso senoidal
us1=heaviside(T); %asigna a us1 para graficar 1 escalon
us2=heaviside(T-Aap1); %asigna a us2 para graficar 1 escalon desplazado
us3=us1-us2; %asigna a us3 para graficar 1 escalon completo
Fsp=1/(2*Aap1); %asigna a Fsp la frecuencia
sp=us3.*(Asp1*sin((2*pi*Fsp*T))); %%asigna a sp para graficar 1 pulso senoidal
axes(handles.axes3)
plot(T,sp),xlabel('tiempo [s]'), ylabel('Amplitud');
elseif ttime==2 %Selección de tiempo discreto para el pulso senoidal
us1=heaviside(T);
us2=heaviside(T-Aap1);
us3=us1-us2;
Fsp=1/(2*Aap1);
sp=us3.*(Asp1*sin((2*pi*Fsp*T))); %%asigna a sp para graficar 1 pulso senoidal discreto
axes(handles.axes3)
stem(T,sp),xlabel('tiempo [s]'), ylabel('Amplitud');
end
function Atp_Callback(hObject, eventdata, handles)
% hObject handle to Atp (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 Atp as text
% str2double(get(hObject,'String')) returns contents of Atp as a double
% --- Executes during object creation, after setting all properties.
function Atp_CreateFcn(hObject, eventdata, handles)
% hObject handle to Atp (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 Apt_Callback(hObject, eventdata, handles)
% hObject handle to Apt (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 Apt as text
% str2double(get(hObject,'String')) returns contents of Apt as a double
% --- Executes during object creation, after setting all properties.
function Apt_CreateFcn(hObject, eventdata, handles)
% hObject handle to Apt (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 pultrian.
function pultrian_Callback(hObject, eventdata, handles)
% hObject handle to pultrian (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global tp
global T
global ttime
Atp1=str2num(char(get(handles.Atp,'string'))); %Amplitud del pulso triangular continuo
Apt1=str2num(char(get(handles.Apt,'string'))); %Ancho del pulso triangular continuo
Ti1=str2num(char(get(handles.Ti,'string'))); %Tiempo inicial
Tf1=str2num(char(get(handles.Tf,'string'))); %Tiempo final
Tm1=str2num(char(get(handles.Tm,'string'))); %Tiempo de muestreo
Des1=str2num(char(get(handles.des,'string')));
T=Ti1+Des1:Tm1:Tf1+Des1; %Vector Tiempo continuo
if (Des1>10 ||Des1<-10)
msgbox('ingrese un valor entre -10 y 10 en el desplazamiento y grafique nuevamente')
return
end
if ttime==1 %Selección de tiempo continuo para el pulso triangular
us1=heaviside(T); %asigna a us1 para graficar 1 escalon
us2=heaviside(T-Apt1); %asigna a us2 para graficar 1 escalon desplazado
us3=us1-us2; %asigna a us3 para graficar 1 escalon completo
Fsp=1/(2*Apt1); %asigna a Fsp la frecuencia
tp=-us3.*(Atp1*sawtooth((2*pi*Fsp*T))); %asigna a tp para graficar el pulso triangular continuo
axes(handles.axes3)
plot(T,tp),xlabel('tiempo [s]'), ylabel('Amplitud');
elseif ttime==2 %Selección de tiempo discreto para el pulso triangular
us1=heaviside(T);
us2=heaviside(T-Apt1);
us3=us1-us2;
Fsp=1/(2*Apt1);
tp=-us3.*(Atp1*sawtooth((2*pi*Fsp*T))); %asigna a tp para graficar el pulso triangular discreto
axes(handles.axes3)
stem(T,tp),xlabel('tiempo [s]'), ylabel('Amplitud');
end
function Acp_Callback(hObject, eventdata, handles)
% hObject handle to Acp (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 Acp as text
% str2double(get(hObject,'String')) returns contents of Acp as a double
% --- Executes during object creation, after setting all properties.
function Acp_CreateFcn(hObject, eventdata, handles)
% hObject handle to Acp (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 Apc_Callback(hObject, eventdata, handles)
% hObject handle to Apc (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 Apc as text
% str2double(get(hObject,'String')) returns contents of Apc as a double
% --- Executes during object creation, after setting all properties.
function Apc_CreateFcn(hObject, eventdata, handles)
% hObject handle to Apc (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 pulcua.
function pulcua_Callback(hObject, eventdata, handles)
% hObject handle to pulcua (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global cp
global T
global ttime
Acp1=str2num(char(get(handles.Acp,'string'))); %Amplitud del pulso cuadrado
Apc1=str2num(char(get(handles.Apc,'string'))); %Ancho del pulso cuadrado
Ti1=str2num(char(get(handles.Ti,'string'))); %Tiempo inicial
Tf1=str2num(char(get(handles.Tf,'string'))); %Tiempo final
Tm1=str2num(char(get(handles.Tm,'string'))); %Tiempo de muestreo
Des1=str2num(char(get(handles.des,'string')));
T=Ti1+Des1:Tm1:Tf1+Des1; %Vector Tiempo continuo
if (Des1>10 ||Des1<-10)
msgbox('ingrese un valor entre -10 y 10 en el desplazamiento y grafique nuevamente')
return
end
if ttime==1 %Selección de tiempo continuo para el pulso cuadrado
us1=heaviside(T); %asigna a us1 para graficar 1 escalon
us2=heaviside(T-Apc1); %asigna a us2 para graficar 1 escalon desplazado
us3=us1-us2; %asigna a us3 para graficar 1 escalon completo
Fsp=1/(2*Apc1); %asigna a Fsp la frecuencia
cp=us3.*abs((Acp1*square((2*pi*Fsp*T)))); %asigna a cp para graficar el pulso cadrado continuo
axes(handles.axes3)
plot(T,cp),xlabel('tiempo [s]'), ylabel('Amplitud');
elseif ttime==2 %Selección de tiempo discreto para el pulso cuadrado
us1=heaviside(T);
us2=heaviside(T-Apc1);
us3=us1-us2;
Fsp=1/(2*Apc1);
cp=us3.*abs((Acp1*square((2*pi*Fsp*T)))); %asigna a cp para graficar el pulso cadrado discreto
axes(handles.axes3)
stem(T,cp),xlabel('tiempo [s]'), ylabel('Amplitud');
end
function wdp_Callback(hObject, eventdata, handles)
% hObject handle to wdp (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 wdp as text
% str2double(get(hObject,'String')) returns contents of wdp as a double
% --- Executes during object creation, after setting all properties.
function wdp_CreateFcn(hObject, eventdata, handles)
% hObject handle to wdp (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 ctp_Callback(hObject, eventdata, handles)
% hObject handle to ctp (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 ctp as text
% str2double(get(hObject,'String')) returns contents of ctp as a double
% --- Executes during object creation, after setting all properties.
function ctp_CreateFcn(hObject, eventdata, handles)
% hObject handle to ctp (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 selection change in invertir.
function invertir_Callback(hObject, eventdata, handles)
% hObject handle to invertir (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: contents = cellstr(get(hObject,'String')) returns invertir contents as cell array
% contents{get(hObject,'Value')} returns selected item from invertir
global inv
inv=get(hObject,'Value');
% --- Executes during object creation, after setting all properties.
function invertir_CreateFcn(hObject, eventdata, handles)
% hObject handle to invertir (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 on button press in invsenoi.
function invsenoi_Callback(hObject, eventdata, handles)
% hObject handle to invsenoi (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global sp_inv
global inv
global sp
global T
global ttime
if inv==9 % si se selecciona en el pop up menu pul sen
if ttime==1 %si es en continuo
sp_inv=fliplr(sp); %señal pul sen invertida
axes(handles.axes1)
plot(T,sp_inv,'r','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud'),title('Señal invertida'); %grafica en continuo
elseif ttime==2
sp_inv=fliplr(sp);
axes(handles.axes1)
stem(T,sp_inv,'r','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud'),title('Señal invertida'); %grafica en discreto ( este no necesita el N)
end
end
% --- Executes on button press in invtrian.
function invtrian_Callback(hObject, eventdata, handles)
% hObject handle to invtrian (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global tp_inv
global inv
global tp
global T
global ttime
if inv==8
if ttime==1
tp_inv=fliplr(tp);
axes(handles.axes1)
plot(T,tp_inv,'r','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud'),title('Señal invertida');
elseif ttime==2
tp_inv=fliplr(tp);
axes(handles.axes1)
stem(T,tp_inv,'r','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud'),title('Señal invertida');
end
end
% --- Executes on button press in invrect.
function invrect_Callback(hObject, eventdata, handles)
% hObject handle to invrect (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global cp_inv
global inv
global cp
global T
global ttime
if inv==7
if ttime==1
cp_inv=fliplr(cp);
axes(handles.axes1)
plot(T,cp_inv,'r','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud'),title('Señal invertida');
elseif ttime==2
cp_inv=fliplr(cp);
axes(handles.axes1)
stem(T,cp_inv,'r','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud'),title('Señal invertida');
end
end
% --- Executes on button press in invsen.
function invsen_Callback(hObject, eventdata, handles)
% hObject handle to invsen (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global s_inv
global inv
global s
global T
global ttime
if inv==6
if ttime==1
s_inv=fliplr(s);
axes(handles.axes1)
plot(T,s_inv,'r','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud'),title('Señal invertida');
elseif ttime==2
s_inv=fliplr(s);
axes(handles.axes1)
stem(T,s_inv,'r','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud'),title('Señal invertida');
end
end
% --- Executes on button press in invtri.
function invtri_Callback(hObject, eventdata, handles)
% hObject handle to invtri (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global t_inv
global inv
global tri
global T
global ttime
if inv==5
if ttime==1
t_inv=fliplr(tri);
axes(handles.axes1)
plot(T,t_inv,'r','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud'),title('Señal invertida');
elseif ttime==2
t_inv=fliplr(tri);
axes(handles.axes1)
stem(T,t_inv,'r','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud'),title('Señal invertida');
end
end
% --- Executes on button press in invcuad.
function invcuad_Callback(hObject, eventdata, handles)
% hObject handle to invcuad (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global inv
global c
global T
global c_inv
global ttime
if inv==4
if ttime==1
c_inv=fliplr(c);
axes(handles.axes1)
plot(T,c_inv,'r','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud'),title('Señal invertida');
elseif ttime==2
c_inv=fliplr(c);
axes(handles.axes1)
stem(T,c_inv,'r','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud'),title('Señal invertida');
end
end
% --- Executes on button press in invimp.
function invimp_Callback(hObject, eventdata, handles)
% hObject handle to invimp (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global i_inv
global inv
global i
global T
global N
global ttime
if inv==1
if ttime==1
i_inv=fliplr(i);
axes(handles.axes1)
plot(T,i_inv,'r','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud'),title('Señal invertida');
elseif ttime==2
i_inv=fliplr(i);
axes(handles.axes1)
stem(N,i_inv,'r','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud'),title('Señal invertida');
end
end
% --- Executes on button press in invram.
function invram_Callback(hObject, eventdata, handles)
% hObject handle to invram (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global inv
global r
global T
global N
global ttime
global r_inv
if inv==3
if ttime==1
r_inv=fliplr(r);
axes(handles.axes1)
plot(T,r_inv,'r','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud'),title('Señal invertida');
elseif ttime==2
r_inv=fliplr(r);
axes(handles.axes1)
stem(N,r_inv,'r','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud'),title('Señal invertida');
end
end
% --- Executes on button press in invesc.
function invesc_Callback(hObject, eventdata, handles)
% hObject handle to invesc (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global inv
global u
global T
global N
global ttime
global u_inv
if inv==2
if ttime==1
u_inv=fliplr(u);
axes(handles.axes1)
plot(T,u_inv,'r','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud'),title('Señal invertida');
elseif ttime==2
u_inv=fliplr(u);
axes(handles.axes1)
stem(N,u_inv,'r','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud'),title('Señal invertida'); %este caso si necesita del N
end
end
% --- Executes on selection change in funmult.
function funmult_Callback(hObject, eventdata, handles)
% hObject handle to funmult (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: contents = cellstr(get(hObject,'String')) returns funmult contents as cell array
% contents{get(hObject,'Value')} returns selected item from funmult
mult= get(hObject,'Value');
global inv
global T
global N
global i
global u
global r
global s
global tri
global c
global sp
global tp
global cp
global ttime
global i_inv
global u_inv
global r_inv
global c_inv
global s_inv
global t_inv
global sp_inv
global tp_inv
global cp_inv
global Ae1
global Ai1
if ttime ==1 % para caso continuo
if inv == 1 %para la invertida impulso
switch mult
case 1
mult1=i_inv.*i;
axes(handles.axes2)
plot(T,i) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 2
mult1=i_inv.*u;
axes(handles.axes2)
plot(T,u) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 3
mult1=r.*i_inv;
axes(handles.axes2)
plot(T,r) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 4
mult1=i_inv.*c;
axes(handles.axes2)
plot(T,c) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 5
mult1=i_inv.*tri;
axes(handles.axes2)
plot(T,tri) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 6
mult1=i_inv.*s;
axes(handles.axes2)
plot(T,s) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 7
mult1=i_inv.*cp;
axes(handles.axes2)
plot(T,cp) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 8
mult1=i_inv.*tp;
axes(handles.axes2)
plot(T,tp) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 9
mult1=i_inv.*sp;
axes(handles.axes2)
plot(T,sp) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
end
elseif inv==2 %para la señal invertida escalon
switch mult
case 1
mult1=u_inv.*i;
axes(handles.axes2)
plot(T,i) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 2
mult1=u_inv.*u;
axes(handles.axes2)
plot(T,u) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 3
mult1=r.*u_inv;
axes(handles.axes2)
plot(T,r) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 4
mult1=u_inv.*c;
axes(handles.axes2)
plot(T,c) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 5
mult1=u_inv.*tri;
axes(handles.axes2)
plot(T,tri) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 6
mult1=u_inv.*s;
axes(handles.axes2)
plot(T,s) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 7
mult1=u_inv.*cp;
axes(handles.axes2)
plot(T,cp) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 8
mult1=u_inv.*tp;
axes(handles.axes2)
plot(T,tp) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 9
mult1=u_inv.*sp;
axes(handles.axes2)
plot(T,sp) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
end
elseif inv==3% para la rampa
switch mult
case 1
mult1=r_inv.*i;
axes(handles.axes2)
plot(T,i) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 2
mult1=r_inv.*u;
axes(handles.axes2)
plot(T,u) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 3
mult1=r_inv.*r;
axes(handles.axes2)
plot(T,r) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 4
mult1=r_inv.*c;
axes(handles.axes2)
plot(T,c) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 5
mult1=r_inv.*tri;
axes(handles.axes2)
plot(T,tri) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 6
mult1=r_inv.*s;
axes(handles.axes2)
plot(T,s) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 7
mult1=r_inv.*cp;
axes(handles.axes2)
plot(T,cp) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 8
mult1=r_inv.*tp;
axes(handles.axes2)
plot(T,tp) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 9
mult1=r_inv.*sp;
axes(handles.axes2)
plot(T,sp) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
end
elseif inv ==4 % para la señal cuadrada
switch mult
case 1
mult1=c_inv.*i;
axes(handles.axes2)
plot(T,i) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 2
mult1=c_inv.*u;
axes(handles.axes2)
plot(T,u) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 3
mult1=c_inv.*r;
axes(handles.axes2)
plot(T,r) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 4
mult1=c_inv.*c;
axes(handles.axes2)
plot(T,c) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 5
mult1=c_inv.*tri;
axes(handles.axes2)
plot(T,tri) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 6
mult1=c_inv.*s;
axes(handles.axes2)
plot(T,s) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 7
mult1=c_inv.*cp;
axes(handles.axes2)
plot(T,cp) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 8
mult1=c_inv.*tp;
axes(handles.axes2)
plot(T,tp) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 9
mult1=c_inv.*sp;
axes(handles.axes2)
plot(T,sp) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
end
elseif inv == 5
switch mult
case 1
mult1=t_inv.*i;
axes(handles.axes2)
plot(T,i) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 2
mult1=t_inv.*u;
axes(handles.axes2)
plot(T,u) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 3
mult1=t_inv.*r;
axes(handles.axes2)
plot(T,r) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 4
mult1=t_inv.*c;
axes(handles.axes2)
plot(T,c) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 5
mult1=t_inv.*tri;
axes(handles.axes2)
plot(T,tri) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 6
mult1=t_inv.*s;
axes(handles.axes2)
plot(T,s) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 7
mult1=t_inv.*cp;
axes(handles.axes2)
plot(T,cp) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 8
mult1=t_inv.*tp;
axes(handles.axes2)
plot(T,tp) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 9
mult1=t_inv.*sp;
axes(handles.axes2)
plot(T,sp) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
end
elseif inv == 6
switch mult
case 1
mult1=s_inv.*i;
axes(handles.axes2)
plot(T,i) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 2
mult1=s_inv.*u;
axes(handles.axes2)
plot(T,u) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 3
mult1=s_inv.*r;
axes(handles.axes2)
plot(T,r) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 4
mult1=s_inv.*c;
axes(handles.axes2)
plot(T,c) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 5
mult1=s_inv.*tri;
axes(handles.axes2)
plot(T,tri) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 6
mult1=s_inv.*s;
axes(handles.axes2)
plot(T,s) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 7
mult1=s_inv.*cp;
axes(handles.axes2)
plot(T,cp) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 8
mult1=s_inv.*tp;
axes(handles.axes2)
plot(T,tp) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 9
mult1=s_inv.*sp;
axes(handles.axes2)
plot(T,sp) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
end
elseif inv==7
switch mult
case 1
mult1=i.*cp_inv;
axes(handles.axes2)
plot(T,i) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 2
mult1=u.*cp_inv;
axes(handles.axes2)
plot(T,u) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 3
mult1=cp_inv.*r;
axes(handles.axes2)
plot(T,r) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 4
mult1=cp_inv.*c;
axes(handles.axes2)
plot(T,c) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 5
mult1=cp_inv.*tri;
axes(handles.axes2)
plot(T,tri) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 6
mult1=cp_inv.*s;
axes(handles.axes2)
plot(T,s) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 7
mult1=cp_inv.*cp;
axes(handles.axes2)
plot(T,cp) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 8
mult1=cp_inv.*tp;
axes(handles.axes2)
plot(T,tp) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 9
mult1=cp_inv.*sp;
axes(handles.axes2)
plot(T,sp) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
end
elseif inv==8
switch mult
case 1
mult1=tp_inv.*i;
axes(handles.axes2)
plot(N,i) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 2
mult1=tp_inv.*u;
axes(handles.axes2)
plot(T,u) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 3
mult1=tp_inv.*r;
axes(handles.axes2)
plot(T,r) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 4
mult1=tp_inv.*c;
axes(handles.axes2)
plot(T,c) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 5
mult1=tp_inv.*tri;
axes(handles.axes2)
plot(T,tri) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 6
mult1=tp_inv.*s;
axes(handles.axes2)
plot(T,s) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 7
mult1=tp_inv.*cp;
axes(handles.axes2)
plot(T,cp) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 8
mult1=tp_inv.*tp;
axes(handles.axes2)
plot(T,tp) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 9
mult1=tp_inv.*sp;
axes(handles.axes2)
plot(T,sp) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
end
elseif inv==9
switch mult
case 1
mult1=sp_inv.*i;
axes(handles.axes2)
plot(T,i) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 2
mult1=sp_inv.*u;
axes(handles.axes2)
plot(T,u) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 3
mult1=sp_inv.*r;
axes(handles.axes2)
plot(T,r) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 4
mult1=sp_inv.*c;
axes(handles.axes2)
plot(T,c) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 5
mult1=sp_inv.*tri;
axes(handles.axes2)
plot(T,tri) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 6
mult1=sp_inv.*s;
axes(handles.axes2)
plot(T,s) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 7
mult1=sp_inv.*cp;
axes(handles.axes2)
plot(T,cp) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 8
mult1=sp_inv.*tp;
axes(handles.axes2)
plot(T,tp) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 9
mult1=sp_inv.*sp;
axes(handles.axes2)
plot(T,sp) %señal a multiplicar
axes(handles.axes3)
plot(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
end
end
elseif ttime ==2 %para caso discreto
Timp2=T;
i2=Ai1*double(Timp2 == 0);
u2=Ae1.*heaviside(T);
Ar2=str2num(char(get(handles.Ar,'string')));
r1=Ar2*(T).*heaviside(T);
i2_inv=fliplr(i2);
u2_inv=fliplr(u2);
r1_inv=fliplr(r1);
if inv == 1 %para la invertida impulso
switch mult
case 1
mult1=i_inv.*i;
axes(handles.axes2)
stem(N,i) %señal a multiplicar
axes(handles.axes3)
stem(N,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 2
mult1=i_inv.*u;
axes(handles.axes2)
stem(N,u) %señal a multiplicar
axes(handles.axes3)
stem(N,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 3
mult1=i_inv.*r;
axes(handles.axes2)
stem(N,r) %señal a multiplicar
axes(handles.axes3)
stem(N,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 4
mult1=i2_inv.*c;
axes(handles.axes2)
stem(T,c) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 5
mult1=i2_inv.*tri;
axes(handles.axes2)
stem(T,tri) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 6
mult1=i2_inv.*s;
axes(handles.axes2)
stem(T,s) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 7
mult1=i2_inv.*cp;
axes(handles.axes2)
stem(T,cp) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 8
mult1=i2_inv.*tp;
axes(handles.axes2)
stem(T,tp) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 9
mult1=i2_inv.*sp;
axes(handles.axes2)
stem(T,sp) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
end
elseif inv==2 %para la señal invertida escalon
switch mult
case 1
mult1=u_inv.*i;
axes(handles.axes2)
stem(N,i) %señal a multiplicar
axes(handles.axes3)
plot(N,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 2
mult1=u_inv.*u;
axes(handles.axes2)
stem(N,u) %señal a multiplicar
axes(handles.axes3)
stem(N,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 3
mult1=u_inv.*r;
axes(handles.axes2)
stem(N,r) %señal a multiplicar
axes(handles.axes3)
stem(N,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 4
mult1=u2_inv.*c;
axes(handles.axes2)
stem(T,c) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 5
mult1=u2_inv.*tri;
axes(handles.axes2)
stem(T,tri) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 6
mult1=u2_inv.*s;
axes(handles.axes2)
stem(T,s) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 7
mult1=u2_inv.*cp;
axes(handles.axes2)
stem(T,cp) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 8
mult1=u2_inv.*tp;
axes(handles.axes2)
stem(T,tp) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 9
mult1=u2_inv.*sp;
axes(handles.axes2)
stem(T,sp) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
end
elseif inv==3% para la rampa
switch mult
case 1
mult1=r_inv.*i;
axes(handles.axes2)
stem(N,i) %señal a multiplicar
axes(handles.axes3)
stem(N,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 2
mult1=r_inv.*u;
axes(handles.axes2)
stem(N,u) %señal a multiplicar
axes(handles.axes3)
stem(N,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 3
mult1=r_inv.*r;
axes(handles.axes2)
stem(N,r) %señal a multiplicar
axes(handles.axes3)
stem(N,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 4
mult1=r1_inv.*c;
axes(handles.axes2)
stem(T,c) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 5
mult1=r1_inv.*tri;
axes(handles.axes2)
stem(T,tri) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 6
mult1=r1_inv.*s;
axes(handles.axes2)
stem(T,s) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 7
mult1=r1_inv.*cp;
axes(handles.axes2)
stem(T,cp) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 8
mult1=r1_inv.*tp;
axes(handles.axes2)
stem(T,tp) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 9
mult1=r1_inv.*sp;
axes(handles.axes2)
stem(T,sp) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
end
elseif inv ==4 % para la señal cuadrada
switch mult
case 1
mult1=c_inv.*i2;
axes(handles.axes2)
stem(N,i) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 2
mult1=c_inv.*u2;
axes(handles.axes2)
stem(T,u2) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 3
mult1=c_inv.*r1;
axes(handles.axes2)
stem(N,r) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 4
mult1=c_inv.*c;
axes(handles.axes2)
stem(T,c) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 5
mult1=c_inv.*tri;
axes(handles.axes2)
stem(T,tri) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 6
mult1=c_inv.*s;
axes(handles.axes2)
stem(T,s) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 7
mult1=c_inv.*cp;
axes(handles.axes2)
stem(T,cp) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 8
mult1=c_inv.*tp;
axes(handles.axes2)
stem(T,tp) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 9
mult1=c_inv.*sp;
axes(handles.axes2)
stem(T,sp) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
end
elseif inv == 5
switch mult
case 1
mult1=t_inv.*i2;
axes(handles.axes2)
stem(N,i) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 2
mult1=t_inv.*u2;
axes(handles.axes2)
stem(T,u2) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 3
mult1=t_inv.*r1;
axes(handles.axes2)
stem(N,r) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 4
mult1=t_inv.*c;
axes(handles.axes2)
stem(T,c) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 5
mult1=t_inv.*tri;
axes(handles.axes2)
stem(T,tri) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 6
mult1=t_inv.*s;
axes(handles.axes2)
stem(T,s) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 7
mult1=t_inv.*cp;
axes(handles.axes2)
stem(T,cp) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 8
mult1=t_inv.*tp;
axes(handles.axes2)
stem(T,tp) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 9
mult1=t_inv.*sp;
axes(handles.axes2)
stem(T,sp) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
end
elseif inv == 6
switch mult
case 1
mult1=s_inv.*i2;
axes(handles.axes2)
stem(N,i) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 2
mult1=s_inv.*u2;
axes(handles.axes2)
stem(T,u2) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 3
mult1=r1.*s_inv;
axes(handles.axes2)
stem(N,r) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 4
mult1=s_inv.*c;
axes(handles.axes2)
stem(T,c) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 5
mult1=s_inv.*tri;
axes(handles.axes2)
stem(T,tri) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 6
mult1=s_inv.*s;
axes(handles.axes2)
stem(T,s) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 7
mult1=s_inv.*cp;
axes(handles.axes2)
stem(T,cp) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 8
mult1=s_inv.*tp;
axes(handles.axes2)
stem(T,tp) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 9
mult1=s_inv.*sp;
axes(handles.axes2)
stem(T,sp) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
end
elseif inv==7
switch mult
case 1
mult1=cp_inv.*i2;
axes(handles.axes2)
stem(N,i) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 2
mult1=cp_inv.*u2;
axes(handles.axes2)
stem(T,u2) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 3
mult1=cp_inv.*r1;
axes(handles.axes2)
stem(N,r) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 4
mult1=cp_inv.*c;
axes(handles.axes2)
stem(T,c) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 5
mult1=cp_inv.*tri;
axes(handles.axes2)
stem(T,tri) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 6
mult1=cp_inv.*s;
axes(handles.axes2)
stem(T,s) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 7
mult1=cp_inv.*cp;
axes(handles.axes2)
stem(T,cp) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 8
mult1=cp_inv.*tp;
axes(handles.axes2)
stem(T,tp) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 9
mult1=cp_inv.*sp;
axes(handles.axes2)
stem(T,sp) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
end
elseif inv==8
switch mult
case 1
mult1=tp_inv.*i2;
axes(handles.axes2)
stem(N,i) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 2
mult1=tp_inv.*u2;
axes(handles.axes2)
stem(T,u2) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 3
mult1=tp_inv.*r1;
axes(handles.axes2)
stem(N,r) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 4
mult1=tp_inv.*c;
axes(handles.axes2)
stem(T,c) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 5
mult1=tp_inv.*tri;
axes(handles.axes2)
stem(T,tri) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 6
mult1=tp_inv.*s;
axes(handles.axes2)
stem(T,s) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 7
mult1=tp_inv.*cp;
axes(handles.axes2)
stem(T,cp) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 8
mult1=tp_inv.*tp;
axes(handles.axes2)
stem(T,tp) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 9
mult1=tp_inv.*sp;
axes(handles.axes2)
stem(T,sp) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
end
elseif inv==9
switch mult
case 1
mult1=i2.*sp_inv;
axes(handles.axes2)
stem(N,i) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 2
mult1=u2.*sp_inv;
axes(handles.axes2)
stem(T,u2) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 3
mult1=sp_inv.*r1;
axes(handles.axes2)
stem(N,r) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 4
mult1=sp_inv.*c;
axes(handles.axes2)
stem(T,c) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 5
mult1=sp_inv.*tri;
axes(handles.axes2)
stem(T,tri) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 6
mult1=sp_inv.*s;
axes(handles.axes2)
stem(T,s) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 7
mult1=sp_inv.*cp;
axes(handles.axes2)
stem(T,cp) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 8
mult1=sp_inv.*tp;
axes(handles.axes2)
stem(T,tp) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
case 9
mult1=sp_inv.*sp;
axes(handles.axes2)
stem(T,sp) %señal a multiplicar
axes(handles.axes3)
stem(T,mult1,'g','LineWidth',2),xlabel('Tiempo[S]');ylabel('Amplitud');title('Señales multiplicadas'); %señal final
end
end
end
% --- Executes during object creation, after setting all properties.
function funmult_CreateFcn(hObject, eventdata, handles)
% hObject handle to funmult (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
function des_Callback(hObject, eventdata, handles)
% hObject handle to des (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 des as text
% str2double(get(hObject,'String')) returns contents of des as a double
% --- Executes during object creation, after setting all properties.
function des_CreateFcn(hObject, eventdata, handles)
% hObject handle to des (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