Vous êtes sur la page 1sur 70

UNIVERSIDAD TCNICA DE AMBATO

FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL


CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

I PORTADA
UNIVERSIDAD TCNICA DE AMBATO
Facultad de Ingeniera en Sistemas, Electrnica e Industrial
Proyecto Acadmico de Fin de Semestre
Ttulo: Resolucin de Sistemas y Secuencias
Discretas a travs del Software Matlab.
Carrera: Ingeniera en Electrnica y
Comunicaciones
rea Acadmica: Electrnica
Lnea de Investigacin: Procesamiento Digital de Seales
Ciclo Acadmico y paralelo: Sptimo Electrnica y
Comunicaciones A
Alumnos participantes: Alarcon Andrea
Andrade Andy
Arroyo Daniel
Carrasco Fernando
Chvez Lissette
Laverde Israel
Monta Cristhian
Valencia Andrs
Mdulo y Docente: Procesamiento Digital de Seales
Ing. Marco Jurado

I. INFORME DEL PROYECTO

1.1 Ttulo
Resolucin de Sistemas y Secuencias Discretas a travs del
software Matlab.

1.2 Objetivos

1.2.1 Objetivo General

Desarrollar una aplicacin que permita la resolucin de


Sistemas y Secuencias Discretas a travs del software Matlab.
UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

1.2.2 Objetivos Especficos


Programar una interfaz GUIDE en el Software Matlab, que
permita visualizar las grficas de secuencias y sistemas
discretos.
Desarrollar un algoritmo de programacin para la generacin
del cdigo en el software Matlab, para dar solucin a
ejercicios de operaciones con secuencias discretas,
Convolucin, Transformada Z, DTFT y DFT
Establecer una relacin entre las variables a emplearse para
la generacin del cdigo e interfaz grfica de Matlab y
verificar el correcto funcionamiento de la aplicacin.

1.3 Resumen

En el presente proyecto tiene por finalidad desarrollar una


aplicacin en el software en Matlab que permita que permita
hacer uso de una interfaz GUIDE en la resolucin de ejercicios
de operaciones para secuencias y sistemas discretos, haciendo
empleo de diferentes mtodos, adems de la Solucin de
Ecuaciones de Diferencia por medio de la Transformada Z,
DTFT, tambin de la resolucin de ejercicios de DFT, as
tambin se dar a conocer de manera clara y concisa la
solucin a estos ejercicios.
De acuerdo a todos los conocimientos adquiridos, se proceder
a realizar ejercicios prcticos matemticamente, y para su
comprobacin se utilizar Matlab que es una herramienta
matemtica que ofrece un entorno de desarrollo integrado con
un lenguaje de programacin propio.

1.4 Palabras clave: Matlab, secuencias discretas,


transformada Z, DTFT, DFT.

1.5 Introduccin

El Procesamiento Digital de Seales (DSP) es una tecnologa que


se vincula con un inmenso conjunto de reas entre las que se
encuentran las telecomunicaciones, el control, la exploracin
UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

del espacio, la medicina y la arqueologa, etc. Hoy en da que


los sistemas de comunicacin se van convirtiendo cada vez ms
en sistemas sin hilos, mviles y multifuncin, la importancia de
un procesamiento de seales sofisticado en dichos equipos se
hace cada vez ms relevante. Encargndose de la
representacin, transformacin y manipulacin de seales,
cuando se refiere al procesado digital de seales, se refiere a la
representacin mediante secuencias de nmeros de precisin
finita y este se realiza utilizando un computador digital. Por lo
general estos sistemas funcionan en tiempo real, lo que
significa que el sistema en tiempo discreto se implementa de
forma que las muestras de salida se calculan a la misma
velocidad a la que se muestrea la seal en tiempo continuo. El
tratamiento en tiempo discreto y en tiempo real de seales en
tiempo continuo es prctica comn en un sistema de control,
comunicaciones, etc.

MATLAB es un lenguaje de alto nivel con un entorno interactivo


utilizado por una gran cantidad de usuarios en el mbito de la
ingeniera. Permite explorar y visualizar las ideas y colaborar en
todas las reas que incluyen procesamiento de seales e
imgenes, comunicaciones, sistemas de control, y las finanzas
computacionales. Fue desarrollado por la empresa The
MathWorks, su nombre proviene de la contraccin de los
trminos MATrix LABoratory y fue inicialmente concebido para
proporcionar fcil acceso a las libreras LINPACK y EISPACK, las
cuales representan hoy en da dos de las libreras ms
importantes en computacin y clculo matricial.

1.6 Materiales y Metodologa

1.6.1 Marco terico

PROCESAMIENTO DIGITAL DE SEALES.


UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

El trmino seal se aplica generalmente a algo que lleva


informacin. Las seales llevan generalmente informacin sobre
el estado o el comportamiento de un sistema fsico y a menudo
se sintetizan seales con el propsito de comunicar informacin
entre seres humanos o entre seres humanos y mquinas.

Aunque las seales se pueden representar de muchas formas,


en todos los casos la informacin est contenida en algn
patrn de variaciones. Las seales se representan
matemticamente como funciones de una o ms variables
independientes. Por ejemplo, una seal de voz se representa
matemticamente como una funcin del tiempo, y una imagen
fotogrfica se representa como una funcin del brillo respecto a
dos variables espaciales.

Fig. 1. Procesamiento Digital de Seales


Fuente: Fundamentos y Teora de Seales Universidad CAECE

Sistemas en tiempo discreto: Las seales en tiempo discreto


como su nombre indican, estn definidos solo en instante de
tiempo discreto. Algunos ejemplos pueden ser el nmero de
nios que nacen un da concreto del ao, un segundo tipo de
seal es cuando transformamos una seal analgica a una seal
discreta mediante el proceso de muestreo.

Secuencias discretas: Las seales discretas se representan


con una secuencia de nmeros denominados muestras. Una

muestra de una seal o secuencia se denota por x (n) siendo


UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

n entero en el intervalo: < n<+[ x( n)=x (nT )] donde x (n)

est definida nicamente para valores enteros de n. En muchas


aplicaciones la secuencia discreta se obtiene muestreando una

seal continua X a (t ) a intervalos de tiempo regulares.

La Discretizacin en el tiempo: Es la diferencia ms


importante entre el procesamiento digital y el procesamiento
anlogo. La discretizacin en el tiempo modifica las frmulas de
las transformadas, convolucin, correlacin, etc., e introduce un
posible problema que no existe en el mundo anlogo,
denominado aliasing, el cual se origina cuando la tasa de
muestreo es insuficiente, generando una prdida irrecuperable
de la informacin contenida en la seal.
Las seales en tiempo discreto tambin pueden ser generadas
por un algoritmo programado en un ordenador, eso se indicar
mediante los ejercicios expuestos en Matlab.

SECUENCIAS FUNDAMENTALES
Impulso Unitario: Es una funcin matemtica que tiene como
caracterstica, el tener un valor de 1 cuando es evaluado en 0
mientras que para el resto de valores la funcin vale 1 desde

a . Se representa como:


1 ; n=00 ;n 0
( n )=

Fig. 2. Representacin del Impulso Unitario


Fuente: Seales y Sistemas - Oppenheim
UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

Escaln Unitario: Es una funcin matemtica que tiene como


caracterstica, el tener un valor de 0 para todos los valores
negativos de su argumento y de 1 para todos los valores
positivos de su argumento, expresado matemticamente seria
de la forma:


0 ;n< 0
1;n0
1 ( n )=

Fig. 3. Representacin del Escaln Unitario


Fuente: Seales y Sistemas - Oppenheim

Esta funcin normalmente se utiliza para presentar variables


que se interrumpen en algn instante de tiempo, para esto se
multiplica la funcin escaln unitario por la funcin que define
la variable en el tiempo.

OPERACIONES DE SECUENCIAS DISCRETAS

Suma de dos secuencias discretas: La suma y ( n) de

dos secuencias discretas x 1(n) y x 2( n) est determinada

por la suma de los valores correspondientes a cada posicin


del trmino, es decir:
y ( n )=x 1 ( n )+ x2 ( n )

y (n)={ [ x 1 ( n 0 )+ x2 ( n0 ) ][ x 1 ( n1 ) + x 2 ( n1 ) ] [ x1 ( n m ) + x 2 ( n m ) ]

Multiplicacin de dos secuencias discretas: En forma


igual a la suma, el producto de la multiplicacin de dos

secuencias discretas x 1(n) y x 2(n) es una funcin


UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

discreta cuyo valor y (n) esta dado por el producto de los

x (n) , la multiplicacin est definida de la siguiente

manera:
y ( n )=x 1 ( n ) . x 2 (n)

y (n)={ [ x 1 ( n 0 ) x 2 ( n 0 ) ][ x1 ( n1 ) x 2 ( n1 ) ] [ x 1 ( nm ) x 2 ( nm ) ]

Multiplicacin de una secuencia discreta por un

escalar: Sea x (n) una secuencia discreta y un

escalar, se puede efectuar la siguiente operacin:


y ( n )= x ( n )

y (n)=[ x ( n0 ) x ( n1 ) x ( n2 ) . x ( n m ) ]

TRANSFORMACIN DE LA VARIABLE INDEPENDIENTE

Desplazamiento: La seal x ( n ) se desplaza k muestras

sustituyendo la variable n por nk . Si k >0 la seal se

retarda k muestras y si k <0 la seal se adelanta k

muestras.
Escalamiento: En el escalado de variable se sustituye la

variable discreta n por kn con k N + . As

aumentamos o disminuimos el valor de la seal x (n ) en los

determinados puntos.
Espejo: Consiste en dibujar la seal x (n ) en el instante

n=0, sustituyendo la variable n por su inverso aditivo

n .

CONVOLUCIN
UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

Si se considera el sistema lineal discreto e invariante en el


tiempo mostrado en la figura 5. La entrada discreta est dada

por la seal x (n), mientras que la salida es y (n) . Es

conocido que al aplicarle como entrada a este sistema un


impulso unitario discreto responde con una salida dada por la

secuencia h(n).

Fig. 4. Relacin entrada - salida de un sistema lineal discreto


Fuente: Tratamiento de Seales Oppenheim

Entonces, la salida y (n) correspondiente a una entrada

discreta arbitraria x (n) est dada por.



y ( n )= x ( k ) h(nk)
k=

A esta frmula se le conoce como Sumatoria de Convolucin. Se

dice que x (n) y h( n) se convolucionan para dar la salida

y (n) ; para esto se usa la notacin abreviada.

y (n)=x (n)h(n)

Si la seal x (n) tiene una longitud finita N , mientras que

h( n) tiene una longitud M, entonces la salida correspondiente

y (n) tendr una longitud N + M 1 .

Propiedades de Convolucin:
UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

Conmutatividad: Es aplicable por ejemplo si queremos


determinar la salida 2 sistemas teniendo que el orden no
cambiar su resultado.

x [n]h[n]=h[n]x [n ]

Asociatividad: Es aplicable por ejemplo si queremos


determinar la salida para la cascada de 2 sistemas con

h1 [n] h2 [n]
respuesta impulsiva y respectivamente. Esta

propiedad permite concluir que el orden de colocacin de los


sistemas no es importante.

x [n]y [n ]w[n]=x [n ]( y [n]w [n ])


( x [n]h1 [n])h2 [n]=( x [n]h2 [n])h1 [n]

Distributividad: Esta propiedad nos permite determinar la


salida cuando la seal de entrada pasa por dos sistemas
conectados en paralelo.

( x [n]+ y [n])w[n]=x [n]w[n]+ y [n ]w[n]

FUNCION SENO Y COSENO

Funcion Coseno: Partimos del concepto bsico del coseno de


un ngulo como la razn entre el cateto adyacente a dicho
ngulo y la hipotenusa en un tringulo rectngulo para luego
redefinir esta razn en un plano cartesiano donde el valor ser

la razn entre la coordenada en X y la longitud del segmento

que forma el ngulo. Con base en la circunferencia unitaria y en


algunos ngulos, llamados notables, podemos construir la
grfica de la funcin coseno cuyo dominio son los reales y rango
los valores entre -1 y 1.
UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

Fig. 5. Grfica Coseno


Fuente: Chicago State University - Michel Sullivan

Funcion Seno: Considerando la razn entre el cateto opuesto a


dicho ngulo y la hipotenusa en un tringulo rectngulo para
luego redefinir esta razn en un plano cartesiano donde el valor
ser la razn entre la coordenada en Y la longitud del segmento
que forma el ngulo. Esto ltimo nos lleva a usar esta definicin
de forma conveniente, escogiendo la longitud del segmento de
magnitud uno, permitindonos redefinir para cualquier ngulo el
seno como la coordenada en Y dentro de una circunferencia
unitaria.

Fig. 6. Grfica Seno


Fuente: Chicago State University - Michel Sullivan
ECUACIN DE DIFERENCIA

Una ecuacin que define el valor de una funcin en el valor


inicial de la variable se llama condicin inicial de la ecuacin en
diferencias de primer orden. El valor de una funcin definido por
medio de una condicin inicial se llama valor inicial.

Una ecuacin de diferencias es una expresin que relaciona


distintas sucesiones, siendo una de ellas una sucesin
desconocida. Son similares a las ecuaciones diferenciales,
sustituyendo las funciones por sucesiones. Una solucin de una
Ecuacin en Diferencias es una funcin que satisface una
UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

ecuacin dada para cualquier valor de la variable perteneciente


a un dominio en el que est definida la funcin.

Se hace notar que dada una ecuacin en diferencias, una


solucin definida en esta forma no necesariamente es nica. El
hecho que una solucin contenga una constante arbitraria
significa que hay una cantidad infinita de soluciones.

Para su resolucin suele utilizarse el mtodo de la transformada


Z o el mtodo de DTFT.

La ecuacin de coeficientes lineales constantes


(LCCD): Es una representacin de un sistema lineal basada
en la ecuacin de la media autor regresiva.
M
y ( n p ) p= x ( nq ) q
q=0
N


p=0

0
Ambos trminos de esta ecuacin pueden dividirse por , si

0
no es cero, normalizando =1 la ecuacin LCCD puede ser

escrita:
N
x ( nq ) q y ( n p ) p
p=1
M
y ( n )=
q=0

Esta forma de la ecuacin LCCD es ms explcita para

comprobar que la salida actual y (n) se define en funcin de

las salidas anteriores y (np) , la entrada actual x (n) , y las

entradas anteriores x (n p) .
UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

TRANSFORMADA Z
La transformada z es la contraparte en tiempo discreto de la
transformada de Laplace en tiempo continuo, y ambas tienen
una relacin similar a la transformada de Fourier
correspondiente. Una razn para usar la transformada z es que
representa una generalizacin de la transformada de Fourier
que puede ser aplicada a una ms amplia variedad de seales,
adems que la notacin en la solucin de problemas resulta ser
ms conveniente y simple.

La transformada de Fourier de una seal x (n) es:


X ( e j )= x(n)e jn .
n =

La transformada z de esta misma secuencia se define como:


X ( z )= x (n) z .
n

n=

Donde z es una variable compleja.

TRANSFORMADA DE FOURIER

El anlisis de Fourier es un conjunto de tcnicas matemticas


basadas en descomponer una seal en sinusoides la
Transformada de Fourier Discreta (DFT) es la herramienta
utilizada cuando se trabaja con seales discretas en la prctica
la DFT se calcula en forma eficiente mediante la Transformada
de Fourier Rpida (FFT) tiene diversas aplicaciones en DSP tales
como:

Anlisis espectral
Convolucin rpida
Sntesis de sonido por modelado espectral
Compresin de audio
Filtrado, etc.
UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

TRANSFORMADA DE FOURIER EN EL TIEMPO DISCRETO


(DTFT).

Esta se obtiene a cuando la respuesta de frecuencia de un


sistema de desplazamiento lineal invariante se encuentra
jn
multiplicando h(n) por una exponencial compleja, e y

sumando sobre n . La transformada de Fourier en el tiempo

discreto (DTFT) de una secuencia, x (n), se define en la

siguiente ecuacin:


X ( e j )= x( n)e jn
n =

Por lo tanto, la respuesta de frecuencia de un sistema de


j
desplazamiento lineal invariante, H (e ), es la DTFT de la

respuesta de al impulso unitario de, h( n).

Para que la DTFT de una secuencia exista, la suma en la


ecuacin propuesta debe converger. Esta, a su vez, requiere

que x (n) sea absolutamente sumable:

|x (n) e jn|=S<
n=

DTFT INVERSA

Dada la transformada X (e jw ) , la secuencia x (n) puede ser

hallada y recuperada mediante la inversa DTFT. Para esto se


aplica la siguiente frmula que est dada de la siguiente
manera:


1
x (n)= X ( e j) e jn d
2
UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

USO DE MATLAB PARA EL GRAFICO DE SECUENCIAS DISCRETAS


En MatLab disponemos del comando filter, cuyos parmetros
son B, A y u. MatLab pone las y en un lado de la igualdad y
las u al otro, por eso, para adaptar nuestra frmula,
despejaremos los trminos de y.
y k y k1 +0.5 . y k2=+ k2

A Los coeficientes que multiplican las y (Cambiamos el


signo), el primer elemento es el que multiplica a yk y por eso
siempre suele ser 1
A=[11+0.5]

B coeficientes que multiplican las u


B=[0 0 1]

Creamos el vector equivalente a la seal pulso delta


delta=[1, zeros (1,5)]

Ejecutamos:
g=filter (B , A , delta)

g=0 0 1.0000 1.0000 0.5000 0

Para representar la secuencia de ponderacin del sistema

usamos el comando stem stem (g , filled )

1.6.2 Materiales

Software Matlab Ejercicios Propuestos


Computadora Fuentes Bibliogrficas

1.7 Resultados y Discusin

Se obtuvo una aplicacin que permite la resolucin de
sistemas discretos mediante el empleo del Software Matlab
UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

es de gran utilidad ya que permite desarrollar entornos


grficos mediante los algoritmos de programacin para
generar las diferentes operaciones estudiadas en el
procesamiento digital de seales y analizarlas de una mejor
manera.
En el desarrollo y ejecucin de la aplicacin se hizo
necesario realizar investigaciones sobre las palabras
reservadas y la forma de utilizacin de los comandos en
Matlab para generar algoritmos ptimos con resultados
eficientes en la resolucin de los ejercicios propuestos.

1.8 Conclusiones

El procesamiento digital de seales asociados a diferentes
mtodos y diferentes herramientas nos permite dar
respuesta a un gran nmero de problemas en base a la
representacin, transformacin y manipulacin de seales
mediante secuencias de nmeros de precisin finita.
El uso de herramientas como el software Matlab es
importante en la generacin de las aplicaciones para la
resolucin de secuencias y sistemas discretos dentro del
procesamiento digital de las seales debido a que permite
desarrollar algoritmos de programacin que nos permiten
tener un mayor anlisis sobre el comportamiento de estos.
El anlisis de de Fourier ayuda a llevar seales en el domino
del tiempo al de la frecuencia con el objetivo de facilitar la
resolucin de problemas matemticos y tambin fsicos, el
software Matlab nos permite interactuar con estos
comportamientos simultneamente.

1.9 Bibliografa

[1] PROAKIS John G., MANOLAKIS Dimitris G; Digital Signal
Processing: Principles, Algorithms, and Applications. Prentice
Hall , 1996 New . Captulo 4.
UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

[2] OPPENHEIM Alan V. And SCHAFER, Ronald W. Digital


Signal Processing.Englewood Cliffs, New Jersey: Prentice Hall,
1975. p 156-157. Disponible en:
http://www.eumus.edu.uy/eme/ensenanza/electivas/dsp/pres
entaciones/clase05.pdf
[3] Proakis J. G., Manolakis D. G.; Tratamiento Digital de
Seales, Ed. Pearson Educacin, Madrid 2007.
[4] Smith, Steven W.; The Scientist and Engineers Guide to
Digital Signal
Processing, California Technical Publishing. Disponible en:
http://olivares.firstcloudit.com/DSP-Practica3.pdf
[5] CAPWELL, Gerald; TMS320 DSP Designers Notebook
Number 57: Initializing the TMS320C5x DSK Board. Texas
Instruments, 1996.
[6] Monson H. Hayes, Digital Signal Processing, (1999),
DTFT, Schaum's Outline Series, McGraw-Hil.
[7] Samir S.Soliman,Seales y sistemas continuos y
discretos, 2nd.ed, Prentice Hall, San, Diego California 2003.





1.10 ANEXOS
1.10.1 Grficas
UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

Fig. 7: Caratula de la aplicacin


Fuente: Matlab - Grupo de Trabajo


Fig. 8: Panel de Seleccin de la aplicacin


UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

Fuente: Matlab - Grupo de Trabajo










Fig. 9: Secuencias Discretas


Fuente: Matlab - Grupo de Trabajo


Fig. 10: Operaciones con Secuencias Discretas


UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

Fuente: Matlab - Grupo de Trabajo














Fig. 11: Transformaciones de la Variable Independiente


Fuente: Matlab - Grupo de Trabajo


UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

Fig. 12: Convolucin


Fuente: Matlab - Grupo de Trabajo












Fig. 12: Ecuaciones de Diferencia


Fuente: Matlab - Grupo de Trabajo

UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

Fig. 13: Transformada Z


Fuente: Matlab - Grupo de Trabajo

Fig. 14: DTFT


Fuente: Matlab - Grupo de Trabajo


1.10.2 Cdigo en Matlab

SECUENCIAS DISCRETAS

function varargout = SECUENCIAS_DISCRETAS(varargin)


UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

% Begin initialization code - DO NOT EDIT


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

% Choose default command line output for SECUENCIAS_DISCRETAS


handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes SECUENCIAS_DISCRETAS wait for user response
(see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the
command line.
function varargout = SECUENCIAS_DISCRETAS_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)
set(handles.axes2,'Visible','off')
% Get default command line output from handles structure
UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

varargout{1} = handles.output;
% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of
MATLAB
% handles structure with handles and user data (see
GUIDATA)
cla
t=0-30:30;
x=[zeros(1,30) ones(1, length(t)-30)];
axes(handles.axes1)
stem(t,x)
ylabel('x(n)')
xlabel('n')
set(handles.axes2,'Visible','off')
axes(handles.axes2)
text('Interpreter','latex','String','$$ Secuencia \,\,
discreta\,\,x(n)$$',...
'Position',[0 1.2],...
'FontSize',14);
text('Interpreter','latex','String','$$ x(n)= \mu_{-1}\,(n)$
$',...
'Position',[0 1],...
'FontSize',14);

% --- Executes on button press in pushbutton3.


function pushbutton3_Callback(hObject, eventdata, handles)
cla
axes(handles.axes1)
x=0:1:5*pi;
y=sin(x.*pi./4);
stem(x,y);
ylabel('x(n)')
xlabel('n')
set(handles.axes2,'Visible','off')
axes(handles.axes2)
text('Interpreter','latex','String','$$ Secuencia \,\,
discreta\,\,x(n)$$',...
'Position',[0 1.2],...
'FontSize',14);
text('Interpreter','latex','String','$$ x(n)=
\sin(\frac{n\, \pi}{4})\,\mu_{-1}\,(n)$$',...
'Position',[0 1],...
'FontSize',14);
% --- Executes on button press in pushbutton4.
function pushbutton4_Callback(hObject, eventdata, handles)
cla
axes(handles.axes1)
x=0:1:5*pi;
y=cos(x.*pi./4);
stem(x,y);
ylabel('x(n)')
xlabel('n')
UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

set(handles.axes2,'Visible','off')
axes(handles.axes2)
text('Interpreter','latex','String','$$ Secuencia \,\,
discreta\,\,x(n)$$',...
'Position',[0 1.2],...
'FontSize',14);
text('Interpreter','latex','String','$$ x(n)=
\cos(\frac{n\, \pi}{4})\,\mu_{-1}\,(n)$$',...
'Position',[0 1],...
'FontSize',14)
% --- Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton2 (see GCBO)
% eventdata reserved - to be defined in a future version of
MATLAB
% handles structure with handles and user data (see
GUIDATA)
cla
axes(handles.axes1)
t=-30:30;
x=[zeros(1,30),1,zeros(1,30)];
stem(t,x)
ylabel('x(n)')
xlabel('n')

set(handles.axes2,'Visible','off')
axes(handles.axes2)
text('Interpreter','latex','String','$$ Secuencia \,\,
discreta\,\,x(n)$$',...
'Position',[0 1.2],...
'FontSize',14);
text('Interpreter','latex','String','$$ x(n)= \delta\,(n)$
$',...
'Position',[0 1],...
'FontSize',14);

function pushbutton9_Callback(hObject, eventdata, handles)


cla
axes(handles.axes1)
t1=0:1:10;
rampa1=t1;
rampa=[zeros(1,101),rampa1];
t2=-10:0.1:0;
t=[t2,t1];
stem(t,rampa)
ylabel('x(n)')
xlabel('n')

set(handles.axes2,'Visible','off')
axes(handles.axes2)
text('Interpreter','latex','String','$$ Secuencia \,\,
discreta\,\,x(n)$$',...
'Position',[0 1.2],...
'FontSize',14);
UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

text('Interpreter','latex','String','$$ x(n)= n\,\mu_{-1}\,


(n)$$',...
'Position',[0 1],...
'FontSize',14);

% --- Executes on button press in pushbutton10.


function pushbutton10_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton10 (see GCBO)
% eventdata reserved - to be defined in a future version of
MATLAB
% handles structure with handles and user data (see
GUIDATA)
cla
axes(handles.axes1)
t=0:1:15;
x=exp(t);
stem(t,x);
ylabel('x(n)')
xlabel('n')

set(handles.axes2,'Visible','off')
axes(handles.axes2)
text('Interpreter','latex','String','$$ Secuencia \,\,
discreta\,\,x(n)$$',...
'Position',[0 1.2],...
'FontSize',14);
text('Interpreter','latex','String','$$ x(n)= a^n\,\mu_{-1}\,
(n)$$',...
'Position',[0 1],...
'FontSize',14);

% --- Executes on button press in pushbutton11.


function pushbutton11_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton11 (see GCBO)
% eventdata reserved - to be defined in a future version of
MATLAB
% handles structure with handles and user data (see
GUIDATA)
cla
axes(handles.axes1)
x=-2*pi:1:2*pi;
y=sinc(x);
stem(x,y);
ylabel('x(n)')
xlabel('n')
set(handles.axes2,'Visible','off')
axes(handles.axes2)
text('Interpreter','latex','String','$$ Secuencia \,\,
discreta\,\,x(n)$$',...
'Position',[0 1.2],...
'FontSize',14);
text('Interpreter','latex','String','$$ x(n)=
\frac{\sin(n\,T_s)}{n\,T_s}\,\,$$',...
'Position',[0 1],...
'FontSize',14);
UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

% --- Executes on button press in pushbutton12.


function pushbutton12_Callback(hObject, eventdata, handles)
cla
axes(handles.axes1)
t=0:1:5;
x=log(t);
stem(t,x);
set(handles.axes2,'Visible','off')
axes(handles.axes2)
text('Interpreter','latex','String','$$ Secuencia \,\,
discreta\,\,x(n)$$',...
'Position',[0 1.2],...
'FontSize',14);
text('Interpreter','latex','String','$$ x(n)=
\frac{\sin(n\,T_s)}{n\,T_s}\,\mu_{-1}\,(n)$$',...
'Position',[0 1],...
'FontSize',14);

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


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

% --- Executes on button press in pushbutton13.


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

OPERACIONES CON SECUENCIAS DISCRETAS

function edit12_Callback(hObject, eventdata, handles)


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

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


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

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


properties.
function edit12_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit12 (see GCBO)
% eventdata reserved - to be defined in a future version of
MATLAB
UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

% handles empty - handles not created until after all


CreateFcns called

% Hint: edit controls usually have a white background on


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

function edit13_Callback(hObject, eventdata, handles)


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

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


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

% Hint: edit controls usually have a white background on


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

function edit14_Callback(hObject, eventdata, handles)


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

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


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

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


properties.
function edit14_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit14 (see GCBO)
UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

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


MATLAB
% handles empty - handles not created until after all
CreateFcns called

% Hint: edit controls usually have a white background on


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

function edit15_Callback(hObject, eventdata, handles)


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

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


text
% str2double(get(hObject,'String')) returns contents
of edit15 as a double
% --- Executes during object creation, after setting all
properties.
function edit15_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit15 (see GCBO)
% eventdata reserved - to be defined in a future version of
MATLAB
% handles empty - handles not created until after all
CreateFcns called
% Hint: edit controls usually have a white background on
Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function edit16_Callback(hObject, eventdata, handles)
% hObject handle to edit16 (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 edit16 as


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

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


properties.
function edit16_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit16 (see GCBO)
UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

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


MATLAB
% handles empty - handles not created until after all
CreateFcns called
% Hint: edit controls usually have a white background on
Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

function edit17_Callback(hObject, eventdata, handles)


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

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


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

% Hint: edit controls usually have a white background on


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

function edit18_Callback(hObject, eventdata, handles)


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


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

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


properties.
function edit18_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit18 (see GCBO)
UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

% 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 pushbutton4.


function pushbutton4_Callback(hObject, eventdata, handles)

n=[-4:1:4]
X=[1 1 2 2 3 3 4 4 5]

%subplot(2,2,1)
axes(handles.axes1);
stem(n,X);
grid on
title(' SECUENCIA x1(n)')
ylabel('x1(n)')
xlabel('n')

% SECUENCIA X2(n)

n=[-4:1:4]
X1=[5 4 3 2 1 1 1 1 1]

%subplot(2,2,1)
axes(handles.axes2);
stem(n,X1);
grid on
title(' SECUENCIA x2(n)')
ylabel('x2(n)')
xlabel('n')

% SECUENCIA suma(n)

n=[-4:1:4];
s1=5;
s2=4;
s3=6;
s4=4;
s5=3;
s6=3;
s7=4;
s8=4;
s9=5;
Xs=[s1 s2 s3 s4 s5 s6 s7 s8 s9]

UNIVERSIDAD TCNICA DE AMBATO


FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

%subplot(2,2,1)
axes(handles.axes3);
stem(n,Xs);
grid on
title('Producto')
ylabel('x1(n) x2(n)')
xlabel('n')

% --- Executes on button press in pushbutton5.


function pushbutton5_Callback(hObject, eventdata, handles)

n=[-4:1:4]
X=[1 1 2 2 3 3 4 4 5]

%subplot(2,2,1)
axes(handles.axes1);
stem(n,X);
grid on
title(' SECUENCIA x1(n)')
ylabel('x1(n)')
xlabel('n')

% SECUENCIA X2(n)

n=[-4:1:4]
X1=[1 1 2 2 3 3 4 4 5]

%subplot(2,2,1)
axes(handles.axes2);
stem(n,X1);
grid on
title(' SECUENCIA x2(n)')
ylabel('x2(n)')
xlabel('n')

% SECUENCIA suma(n)

n=[-4:1:4];
Xs=2.*[1 1 2 2 3 3 4 4 5]

%subplot(2,2,1)
axes(handles.axes3);
stem(n,Xs);
grid on
title('Producto escalar')
ylabel('2 x1(n)')
xlabel('n')

% --- Executes on button press in pushbutton6.


function pushbutton6_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton6 (see GCBO)
% eventdata reserved - to be defined in a future version of
MATLAB
UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

% handles structure with handles and user data (see


GUIDATA)
operaciones1

% --- Executes on button press in pushbutton7.


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

TRANSFORMACION DE LA VARIABLE INDEPENDIENTE

function varargout = TRANSFORMACION(varargin)


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


TRANSFORMACION

% Last Modified by GUIDE v2.5 14-Aug-2016 12:52:40

% Begin initialization code - DO NOT EDIT


gui_Singleton = 1;
UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

gui_State = struct('gui_Name', mfilename, ...


'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn',
@TRANSFORMACION_OpeningFcn, ...
'gui_OutputFcn',
@TRANSFORMACION_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 TRANSFORMACION is made visible.


function TRANSFORMACION_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 TRANSFORMACION (see
VARARGIN)

% Choose default command line output for TRANSFORMACION


handles.output = hObject;

% Update handles structure


guidata(hObject, handles);

% UIWAIT makes TRANSFORMACION wait for user response (see


UIRESUME)
% uiwait(handles.figure1);

% --- Outputs from this function are returned to the command


line.
function varargout = TRANSFORMACION_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


UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

varargout{1} = handles.output;

% --- Executes on button press in pushbutton1.


function pushbutton1_Callback(hObject, eventdata, handles)
%TRASFORMACION DE LA VARIABLE INDEPENDIENTE %X(-3n-2)
% SECUENCIA X(n)
n=[-4:1:4];
X=[2 2 1 1 3 3 1 1 1];
%subplot(2,2,1)
axes(handles.axes1);
stem(n,X);
grid on
title(' SECUENCIA X(n)')
ylabel('X(n)')
xlabel('n')
% DESPLAZAMIENTO X(n-4)
nd=0:1:8;
%subplot(2,2,2)
axes(handles.axes2);
stem(nd,X);
grid on
title(' DESPLAZAMIENTO')
ylabel('X(n-4)')
xlabel('n')

% ESCALAMIENTO X(2n-4)
e=0:1:4;
Xe=[2 1 3 1 1];
%subplot(2,2,3)
axes(handles.axes3);
stem(e,Xe);
grid on
title('ESCALAMIENTO')
ylabel('X(2n-4)')
xlabel('n')

% ESPEJO X(-2n-4)
esp=-4:1:0;
Xe=[1 1 3 1 2];

%subplot(2,2,4)
axes(handles.axes4);
stem(esp,Xe);
grid on
title('ESPEJO')
ylabel('X(-2n-4)')
xlabel('n')

% hObject handle to pushbutton1 (see GCBO)


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

UNIVERSIDAD TCNICA DE AMBATO


FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

% --- Executes on button press in pushbutton2.


function pushbutton2_Callback(hObject, eventdata, handles)
%TRASFORMACION DE LA VARIABLE INDEPENDIENTE %x(-1/2n-5)
% SECUENCIA X(n)
n=[-4:1:4];
X=[2 2 1 1 3 3 1 1 1];
%subplot(2,2,1)
axes(handles.axes1);
stem(n,X);
grid on
title(' SECUENCIA X(n)')
ylabel('X(n)')
xlabel('n')
% DESPLAZAMIENTO X(n-5)
nd=1:1:9;
%subplot(2,2,2)
axes(handles.axes2);
stem(nd,X);
grid on
title(' DESPLAZAMIENTO')
ylabel('X(n-5)')
xlabel('n')
% ESCALAMIENTO X(1/2n-5)
e=2:2:18;
Xe=[2 2 1 1 3 3 1 1 1];
%subplot(2,2,3)
axes(handles.axes3);
stem(e,Xe);
grid on
title('ESCALAMIENTO')
ylabel('X(1/2n-5)')
xlabel('n')

% ESPEJO X(-2n-4)
esp=-18:2:-2;
Xe=[1 1 1 3 3 1 1 2 2];

%subplot(2,2,4)
axes(handles.axes4);
stem(esp,Xe);
grid on
title('ESPEJO')
ylabel('X(-1/2n-5)')
xlabel('n')

% --- Executes on button press in SALIR.


function SALIR_Callback(hObject, eventdata, handles)
close (TRANSFORMACION)
% 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)

UNIVERSIDAD TCNICA DE AMBATO


FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

function edit1_Callback(hObject, eventdata, handles)


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

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


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

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


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

% Hint: edit controls usually have a white background on


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

function edit2_Callback(hObject, eventdata, handles)


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

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


text
% str2double(get(hObject,'String')) returns contents
of edit2 as a double
% --- Executes during object creation, after setting all
properties.
function edit2_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit2 (see GCBO)
% eventdata reserved - to be defined in a future version of
MATLAB
% handles empty - handles not created until after all
CreateFcns called
% Hint: edit controls usually have a white background on
Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

UNIVERSIDAD TCNICA DE AMBATO


FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

function edit3_Callback(hObject, eventdata, handles)


% hObject handle to edit3 (see GCBO)
% eventdata reserved - to be defined in a future version of
MATLAB
% handles structure with handles and user data (see
GUIDATA)
% Hints: get(hObject,'String') returns contents of edit3 as
text
% str2double(get(hObject,'String')) returns contents
of edit3 as a double
% --- Executes during object creation, after setting all
properties.
function edit3_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit3 (see GCBO)
% eventdata reserved - to be defined in a future version of
MATLAB
% handles empty - handles not created until after all
CreateFcns called
% Hint: edit controls usually have a white background on
Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function edit4_Callback(hObject, eventdata, handles)
% hObject handle to edit4 (see GCBO)
% eventdata reserved - to be defined in a future version of
MATLAB
% handles structure with handles and user data (see
GUIDATA)
% Hints: get(hObject,'String') returns contents of edit4 as
text
% str2double(get(hObject,'String')) returns contents
of edit4 as a double

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


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

% Hint: edit controls usually have a white background on


Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function edit5_Callback(hObject, eventdata, handles)
% hObject handle to edit5 (see GCBO)
UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

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


MATLAB
% handles structure with handles and user data (see
GUIDATA)

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


text
% str2double(get(hObject,'String')) returns contents
of edit5 as a double
% --- Executes during object creation, after setting all
properties.
function edit5_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit5 (see GCBO)
% eventdata reserved - to be defined in a future version of
MATLAB
% handles empty - handles not created until after all
CreateFcns called
% Hint: edit controls usually have a white background on
Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

function edit7_Callback(hObject, eventdata, handles)


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

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


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

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


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

% Hint: edit controls usually have a white background on


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

UNIVERSIDAD TCNICA DE AMBATO


FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

function edit8_Callback(hObject, eventdata, handles)


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

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


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

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


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

% Hint: edit controls usually have a white background on


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

function edit9_Callback(hObject, eventdata, handles)


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

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


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

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


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

% Hint: edit controls usually have a white background on


Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

end

function edit10_Callback(hObject, eventdata, handles)


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

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


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

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


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

% Hint: edit controls usually have a white background on


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

function edit11_Callback(hObject, eventdata, handles)


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

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


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

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


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

% Hint: edit controls usually have a white background on


Windows.
% See ISPC and COMPUTER.
UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

if ispc && isequal(get(hObject,'BackgroundColor'),


get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

% --- Executes on button press in pushbutton3.


function pushbutton3_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton3 (see GCBO)
% eventdata reserved - to be defined in a future version of
MATLAB
% handles structure with handles and user data (see
GUIDATA)
n=[-4:1:4];
X=[2 2 1 1 3 3 1 1 1];

%subplot(2,2,1)
axes(handles.axes1);
stem(n,X);
grid on
title(' SECUENCIA X(n)')
ylabel('X(n)')
xlabel('n')
% DESPLAZAMIENTO X(n-4)
nd=-1:1:7;
%subplot(2,2,2)
axes(handles.axes2);
stem(nd,X);
grid on
title(' DESPLAZAMIENTO')
ylabel('X(n-3)')
xlabel('n')

% ESCALAMIENTO X(n-3)
e=-4:1:4;
Xe=[2 2 1 1 3 3 1 1 1];
%subplot(2,2,3)
axes(handles.axes3);
stem(e,Xe);
grid on
title('ESCALAMIENTO')
ylabel('X(n-3)')
xlabel('n')

% ESPEJO X(-n-3)
esp=-4:1:4;
Xe=[ 1 1 1 3 3 1 1 2 2];

%subplot(2,2,4)
axes(handles.axes4);
stem(esp,Xe);
grid on
title('ESPEJO')
ylabel('X(-n-3)')
xlabel('n')
UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

CONVOLUCIN

function varargout = CONV(varargin)


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

% Last Modified by GUIDE v2.5 14-Aug-2016 19:40:16

% Begin initialization code - DO NOT EDIT


gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @CONV_OpeningFcn, ...
'gui_OutputFcn', @CONV_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
UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT

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


function CONV_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 CONV (see VARARGIN)

% Choose default command line output for CONV


handles.output = hObject;

set(handles.axes7,'Visible','off')
axes(handles.axes7)
cla
text('Interpreter','latex','String','$
$y(n)=\sum_{k=-\infty}^\infty x(k)\, \,y(n-k) $$',...
'Position',[0 0.5],...
'FontSize',14);

% Update handles structure


guidata(hObject, handles);

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


% uiwait(handles.figure1);

% --- Outputs from this function are returned to the command


line.
function varargout = CONV_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 edit1_Callback(hObject, eventdata, handles)


% hObject handle to edit1 (see GCBO)
% eventdata reserved - to be defined in a future version of
MATLAB
% handles structure with handles and user data (see
GUIDATA)
UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

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


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

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


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

% Hint: edit controls usually have a white background on


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

function edit4_Callback(hObject, eventdata, handles)


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

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


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

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


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

% Hint: edit controls usually have a white background on


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

% --- Executes on button press in pushbutton1.


function pushbutton1_Callback(hObject, eventdata, handles)

%Se_al de entrada x(n)


UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

n=[0:1:10];
xn = (cos (n));
axes(handles.axes1);
stem(n,xn), xlabel('n'), ylabel('x(n)'),title('Se_al 1');

%se_al h(n)
n=[0:1:10];
hn =(sin(n));
axes(handles.axes2);
stem(n,hn), xlabel('n'), ylabel('y(n)'),title('Se_al 2');

%Operacion convolucion
nconv=[0:1:20];
c=conv(xn,hn); %Permite realizar la convolucion
axes(handles.axes3);
stem(nconv,c), xlabel('n'),
ylabel('y(n)'),title('CONVOLUCI_N');

function edit5_Callback(hObject, eventdata, handles)


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

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


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

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


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

% Hint: edit controls usually have a white background on


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

function edit6_Callback(hObject, eventdata, handles)


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

UNIVERSIDAD TCNICA DE AMBATO


FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

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


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

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


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

% Hint: edit controls usually have a white background on


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

function edit7_Callback(hObject, eventdata, handles)


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

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


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

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


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

% Hint: edit controls usually have a white background on


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

function edit8_Callback(hObject, eventdata, handles)


% hObject handle to edit8 (see GCBO)
% eventdata reserved - to be defined in a future version of
MATLAB
UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

% handles structure with handles and user data (see


GUIDATA)

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


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

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


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

% Hint: edit controls usually have a white background on


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

function edit9_Callback(hObject, eventdata, handles)


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

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


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

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


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

% Hint: edit controls usually have a white background on


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

function edit10_Callback(hObject, eventdata, handles)


% hObject handle to edit10 (see GCBO)
UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

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


MATLAB
% handles structure with handles and user data (see
GUIDATA)

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


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

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


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

% Hint: edit controls usually have a white background on


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

function edit11_Callback(hObject, eventdata, handles)


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

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


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

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


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

% Hint: edit controls usually have a white background on


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

UNIVERSIDAD TCNICA DE AMBATO


FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

function edit12_Callback(hObject, eventdata, handles)


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

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


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

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


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

% Hint: edit controls usually have a white background on


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

function edit13_Callback(hObject, eventdata, handles)


% hObject handle to edit13 (see GCBO)
% eventdata reserved - to be defined in a future version of
MATLAB
% handles structure with handles and user data (see
GUIDATA)
% Hints: get(hObject,'String') returns contents of edit13 as
text
% str2double(get(hObject,'String')) returns contents
of edit13 as a double
% --- Executes during object creation, after setting all
properties.
function edit13_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit13 (see GCBO)
% eventdata reserved - to be defined in a future version of
MATLAB
% handles empty - handles not created until after all
CreateFcns called
% Hint: edit controls usually have a white background on
Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function edit14_Callback(hObject, eventdata, handles)
% hObject handle to edit14 (see GCBO)
UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

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


MATLAB
% handles structure with handles and user data (see
GUIDATA)

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


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

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


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

% Hint: edit controls usually have a white background on


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

function edit15_Callback(hObject, eventdata, handles)


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

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


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

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


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

% Hint: edit controls usually have a white background on


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

UNIVERSIDAD TCNICA DE AMBATO


FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

function edit16_Callback(hObject, eventdata, handles)


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


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

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


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

% Hint: edit controls usually have a white background on


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

function edit17_Callback(hObject, eventdata, handles)


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

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


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

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


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

% Hint: edit controls usually have a white background on


Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

end

function edit18_Callback(hObject, eventdata, handles)


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


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

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


properties.
function edit18_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit18 (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 edit19_Callback(hObject, eventdata, handles)


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


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

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


properties.
function edit19_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit19 (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'))
UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

set(hObject,'BackgroundColor','white');
end

function edit20_Callback(hObject, eventdata, handles)


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


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

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


properties.
function edit20_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit20 (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 edit21_Callback(hObject, eventdata, handles)


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


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

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


properties.
function edit21_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit21 (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.
UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

% See ISPC and COMPUTER.


if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

function edit22_Callback(hObject, eventdata, handles)


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


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

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


properties.
function edit22_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit22 (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 pushbutton2.


function pushbutton2_Callback(hObject, eventdata, handles)
% SECUENCIA X1(n)
nn4=eval(get(handles.edit5, 'String'));
nn3=eval(get(handles.edit6, 'String'));
nn2=eval(get(handles.edit7, 'String'));
nn1=eval(get(handles.edit8, 'String'));
n0=eval(get(handles.edit9, 'String'));
np1=eval(get(handles.edit10, 'String'));
np2=eval(get(handles.edit11, 'String'));
np3=eval(get(handles.edit12, 'String'));
np4=eval(get(handles.edit13, 'String'));

n=[-4:1:4];
X=[nn4 nn3 nn2 nn1 n0 np1 np2 np3 np4];
axes(handles.axes4);
stem(n,X), xlabel('n'), ylabel('x(n)'),title('Se_al 1');

% SECUENCIA X2(n)
UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

nn42=eval(get(handles.edit14, 'String'));
nn32=eval(get(handles.edit15, 'String'));
nn22=eval(get(handles.edit16, 'String'));
nn12=eval(get(handles.edit17, 'String'));
n02=eval(get(handles.edit18, 'String'));
np12=eval(get(handles.edit19, 'String'));
np22=eval(get(handles.edit20, 'String'));
np32=eval(get(handles.edit21, 'String'));
np42=eval(get(handles.edit22, 'String'));

n=[-4:1:4];
X1=[nn42 nn32 nn22 nn12 n02 np12 np22 np32 np42];
axes(handles.axes5);
stem(n,X1), xlabel('n'), ylabel('h(n)'),title('Se_al 2');

%Operacion convolucion
nconv=[-8:1:8];
c=conv(X,X1); %Permite realizar la convolucion
axes(handles.axes6);
stem(nconv,c), xlabel('n'),
ylabel('y(n)'),title('CONVOLUCI_N');

% --- 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(CONV)
ECUACIONES DE DIFERENCIA

function varargout = ECUACIONES(varargin)


% ECUACIONES M-file for ECUACIONES.fig
% ECUACIONES, by itself, creates a new ECUACIONES or
raises the existing
% singleton*.
%
% H = ECUACIONES returns the handle to a new ECUACIONES
or the handle to
% the existing singleton*.
%
% ECUACIONES('CALLBACK',hObject,eventData,handles,...)
calls the local
% function named CALLBACK in ECUACIONES.M with the given
input arguments.
%
% ECUACIONES('Property','Value',...) creates a new
ECUACIONES or raises the
% existing singleton*. Starting from the left, property
value pairs are
% applied to the GUI before ECUACIONES_OpeningFcn gets
called. An
UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

% unrecognized property name or invalid value makes


property application
% stop. All inputs are passed to ECUACIONES_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


ECUACIONES

% Last Modified by GUIDE v2.5 14-Aug-2016 17:18:01

% Begin initialization code - DO NOT EDIT


gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @ECUACIONES_OpeningFcn,
...
'gui_OutputFcn', @ECUACIONES_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 ECUACIONES is made visible.


function ECUACIONES_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 ECUACIONES (see
VARARGIN)

% Choose default command line output for ECUACIONES


handles.output = hObject;

% Update handles structure


guidata(hObject, handles);
UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

% UIWAIT makes ECUACIONES wait for user response (see


UIRESUME)
% uiwait(handles.figure1);

% --- Outputs from this function are returned to the command


line.
function varargout = ECUACIONES_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 button press in pushbutton1.


function pushbutton1_Callback(hObject, eventdata, handles)
% y(n) = 3x(n) - 2*x(n-1) + 5*x(n-2)
% donde
% x(n) = {1, 2, -2}
% Definir x(n)

x = [1 2 -2]; % coeficientes de la entrada


% Definir coeficientes y(n)
a = [1 0 0]; % coeficientes de y(n)
% Definir coeficientes x(n)
b = [3 -2 5]; % coeficientes de x(n)

y = filter(b,a,x); % resolucion de la ecuaci_n de


diferencias

disp(y)

grid on % crea cuadriculas en el plano


%hold on % escalamiento de ejes
xlabel('secuencia x') % titulo en el eje de las x
ylabel('Coeficientes y') % titulo en el eje de las y
axes(handles.axes1);
stem(y)

% dibuja la secuencia y en el plano


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

% --- Executes on button press in pushbutton5.


function pushbutton2_Callback(hObject, eventdata, handles)
% y(n) = -8.3x(n)+8.4x(n-1)-8.96x(n-2)+6.5x(n-3)-7.5x(n-4)
UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

% donde
% x(n) = {4,-2,8,7,6}
% Definir x(n)

x = [4 -2 8 7 6]; % coeficientes de la entrada


% Definir coeficientes y(n)
a = [1 1 1 1 2] ; % coeficientes de y(n)
% Definir coeficientes x(n)
b = [-8.3 8.4 -8.96 6.5 -7.5]; % coeficientes de
x(n)

y = filter(b,a,x); % resolucion de la ecuaci_n de


diferencias

disp(y)

grid on % crea cuadriculas en el plano


%hold on % escalamiento de ejes
xlabel('secuencia x') % titulo en el eje de las x
ylabel('Coeficientes y') % titulo en el eje de las y
axes(handles.axes1);
stem(y)
% hObject handle to pushbutton5 (see GCBO)
% eventdata reserved - to be defined in a future version of
MATLAB
% handles structure with handles and user data (see
GUIDATA)

% --- Executes on button press in pushbutton6.


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

% --- Executes on button press in pushbutton7.


function pushbutton7_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton7 (see GCBO)
% eventdata reserved - to be defined in a future version of
MATLAB
% handles structure with handles and user data (see
GUIDATA)
% y(n)=2x(n)-x(n-1)-4x(n-2)-3X(n-3)
% x(n)=[1 12 -2 8]
x = [1 12 -2 8]; % coeficientes de la entrada
% Definir coeficientes y(n)
a = [-5 7 -3 2] ; % coeficientes de y(n)
% Definir coeficientes x(n)
b = [1 12 -2 8]; % coeficientes de x(n)

y = filter(b,a,x); % resolucion de la ecuaci_n de


diferencias

UNIVERSIDAD TCNICA DE AMBATO


FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

disp(y)

grid on % crea cuadriculas en el plano


%hold on % escalamiento de ejes
xlabel('secuencia x') % titulo en el eje de las x
ylabel('Coeficientes y') % titulo en el eje de las y
axes(handles.axes1);
stem(y)

TRANSFORMADA Z Y TRANSFORMADA Z INVERSA

function varargout = TransformadaZ(varargin)


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


TransformadaZ

% Last Modified by GUIDE v2.5 14-Aug-2016 18:21:09

% Begin initialization code - DO NOT EDIT


gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn',
@TransformadaZ_OpeningFcn, ...
UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

'gui_OutputFcn',
@TransformadaZ_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 TransformadaZ is made visible.


function TransformadaZ_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 TransformadaZ (see
VARARGIN)

% Choose default command line output for TransformadaZ


handles.output = hObject;

% Update handles structure


guidata(hObject, handles);

% UIWAIT makes TransformadaZ wait for user response (see


UIRESUME)
% uiwait(handles.figure1);

% --- Outputs from this function are returned to the command


line.
function varargout = TransformadaZ_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 SD_Callback(hObject, eventdata, handles)


% hObject handle to SD (see GCBO)
UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

% 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 SD as text


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

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


properties.
function SD_CreateFcn(hObject, eventdata, handles)
% hObject handle to SD (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 TZ_Callback(hObject, eventdata, handles)


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


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

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


properties.
function TZ_CreateFcn(hObject, eventdata, handles)
% hObject handle to TZ (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 TransZ.


function TransZ_Callback(hObject, eventdata, handles)
% hObject handle to TransZ (see GCBO)
UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

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


MATLAB
% handles structure with handles and user data (see
GUIDATA)

syms n z %Establesco las valiables de


trabajo
%Toma los datos ingresados en el edit text
f=(cos(n));
axes(handles.axes1); %Ubico el axes1 de la
interfas grafica
set(handles.axes1); %Orden que indica a matlab
que grafique lo que programe a continuacion
ezplot (f); %Orden que me permite el
grafico de una funcion
title('Se_al') %t_tulo de Cuadr_ula
grid on
ylabel('x(n)') %Nombre eje Y
xlabel('n') %Nombre eje X
Zeq = ztrans(f,n,z) %Orden que realiza la
transformada z f=se_al, n=variable que ingreso, z=variable de
salida
Zeqp =char(Zeq); %Transformo el resultado para
poder mostrarlo
ecuacion=findobj(gcbf,'Tag','text5'); %Ubico el static text
en la interfas grafica
set(ecuacion,'String',Zeqp); %Ubico el resultado en
el static text
axes(handles.axes2); %Ubico el axes2 de la
interfas grafica
set(handles.axes2); %Orden que indica a matlab
que grafique lo que programe a continuacion
ezplot (Zeq); %Orden que grafique la
transformada z
title('Transformada Z') %t_tulo de Cuadr_ula
grid on
ylabel('X(Z)') %Nombre eje Y
xlabel('Z') %Nombre eje X

% --- Executes on button press in TransZi.


function TransZi_Callback(hObject, eventdata, handles)
% hObject handle to TransZi (see GCBO)
% eventdata reserved - to be defined in a future version of
MATLAB
% handles structure with handles and user data (see
GUIDATA)
syms z n %Establesco las valiables
de trabajo
%Toma los datos ingresados en el edit text
f= (z/(z-1)^2);
axes(handles.axes1); %Ubico el axes1 de la
interfas grafica
set(handles.axes1); %Orden que indica a
matlab que grafique lo que programe a continuacion
ezplot (f); %Grafico de la
transformada z
UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

title('Transformada Z') %t_tulo de Cuadr_ula


grid on
ylabel('X(Z)') %Nombre eje Y
xlabel('Z') %Nombre eje X
Zeq=iztrans(f,n); %Orden que realiza la
Transformada Z inversa
Zeqp =char(Zeq); %Transformo el resultado
para poder mostrarlo
ecuacion=findobj(gcbf,'Tag','text6'); %Ubico el static
text en la interfas grafica
set(ecuacion,'String',Zeqp); %Ubico el resultado
en el static text
axes(handles.axes2); %Ubico el axes2 de
la interfas grafica
set(handles.axes2);
ezplot (Zeq); %Grafico la
secuencia de entrada
title('Se_al') %t_tulo de Cuadr_ula
grid on
ylabel('x(n)') %Nombre eje Y
xlabel('n') %Nombre eje X

% --- Executes on button press in pushbutton3.


function pushbutton3_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton3 (see GCBO)
% eventdata reserved - to be defined in a future version of
MATLAB
% handles structure with handles and user data (see
GUIDATA)
set(handles.SD,'String','');
set(handles.TZ,'String','');
set(handles.text5,'String','');
set(handles.text6,'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(TransformadaZ)

% --- Executes on button press in Transen.


function Transen_Callback(hObject, eventdata, handles)
% hObject handle to Transen (see GCBO)
% eventdata reserved - to be defined in a future version of
MATLAB
% handles structure with handles and user data (see
GUIDATA)
syms n z %Establesco las valiables de
trabajo
%Toma los datos ingresados en el edit text
f=(sin(n));
UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

axes(handles.axes1); %Ubico el axes1 de la


interfas grafica
set(handles.axes1); %Orden que indica a matlab
que grafique lo que programe a continuacion
ezplot (f); %Orden que me permite el
grafico de una funcion
title('Se_al') %t_tulo de Cuadr_ula
grid on
ylabel('x(n)') %Nombre eje Y
xlabel('n') %Nombre eje X
Zeq = ztrans(f,n,z) %Orden que realiza la
transformada z f=se_al, n=variable que ingreso, z=variable de
salida
Zeqp =char(Zeq); %Transformo el resultado para
poder mostrarlo
ecuacion=findobj(gcbf,'Tag','text5'); %Ubico el static text
en la interfas grafica
set(ecuacion,'String',Zeqp); %Ubico el resultado en
el static text
axes(handles.axes2); %Ubico el axes2 de la
interfas grafica
set(handles.axes2); %Orden que indica a matlab
que grafique lo que programe a continuacion
ezplot (Zeq); %Orden que grafique la
transformada z
title('Transformada Z') %t_tulo de Cuadr_ula
grid on
ylabel('X(Z)') %Nombre eje Y
xlabel('Z') %Nombre eje X

% --- Executes on button press in transn.


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

syms n z %Establesco las valiables de


trabajo
%Toma los datos ingresados en el edit text
f=(n);
axes(handles.axes1); %Ubico el axes1 de la
interfas grafica
set(handles.axes1); %Orden que indica a matlab
que grafique lo que programe a continuacion
ezplot (f); %Orden que me permite el
grafico de una funcion
title('Se_al') %t_tulo de Cuadr_ula
grid on
ylabel('x(n)') %Nombre eje Y
xlabel('n') %Nombre eje X
Zeq = ztrans(f,n,z) %Orden que realiza la
transformada z f=se_al, n=variable que ingreso, z=variable de
salida
UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

Zeqp =char(Zeq); %Transformo el resultado para


poder mostrarlo
ecuacion=findobj(gcbf,'Tag','text5'); %Ubico el static text
en la interfas grafica
set(ecuacion,'String',Zeqp); %Ubico el resultado en
el static text
axes(handles.axes2); %Ubico el axes2 de la
interfas grafica
set(handles.axes2); %Orden que indica a matlab
que grafique lo que programe a continuacion
ezplot (Zeq); %Orden que grafique la
transformada z
title('Transformada Z') %t_tulo de Cuadr_ula
grid on
ylabel('X(Z)') %Nombre eje Y
xlabel('Z') %Nombre eje X

% --- Executes on button press in pushbutton7.


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

syms z n %Establesco las valiables


de trabajo
%Toma los datos ingresados en el edit text
f= (z/(z-1));
axes(handles.axes1); %Ubico el axes1 de la
interfas grafica
set(handles.axes1); %Orden que indica a
matlab que grafique lo que programe a continuacion
ezplot (f); %Grafico de la
transformada z
title('Transformada Z') %t_tulo de Cuadr_ula
grid on
ylabel('X(Z)') %Nombre eje Y
xlabel('Z') %Nombre eje X
Zeq=iztrans(f,n); %Orden que realiza la
Transformada Z inversa
Zeqp =char(Zeq); %Transformo el resultado
para poder mostrarlo
ecuacion=findobj(gcbf,'Tag','text6'); %Ubico el static
text en la interfas grafica
set(ecuacion,'String',Zeqp); %Ubico el resultado
en el static text
axes(handles.axes2); %Ubico el axes2 de
la interfas grafica
set(handles.axes2);
ezplot (Zeq); %Grafico la
secuencia de entrada
title('Se_al') %t_tulo de Cuadr_ula
grid on
ylabel('x(n)') %Nombre eje Y
xlabel('n') %Nombre eje X
UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

% --- Executes on button press in transfz.


function transfz_Callback(hObject, eventdata, handles)
% hObject handle to transfz (see GCBO)
% eventdata reserved - to be defined in a future version of
MATLAB
% handles structure with handles and user data (see
GUIDATA)
syms z n
f= (z/(z-0.5));
axes(handles.axes1); %Ubico el axes1 de la
interfas grafica
set(handles.axes1); %Orden que indica a
matlab que grafique lo que programe a continuacion
ezplot (f); %Grafico de la
transformada z
title('Transformada Z') %t_tulo de Cuadr_ula
grid on
ylabel('X(Z)') %Nombre eje Y
xlabel('Z') %Nombre eje X
Zeq=iztrans(f,n); %Orden que realiza la
Transformada Z inversa
Zeqp =char(Zeq); %Transformo el resultado
para poder mostrarlo
ecuacion=findobj(gcbf,'Tag','text6'); %Ubico el static
text en la interfas grafica
set(ecuacion,'String',Zeqp); %Ubico el resultado
en el static text
axes(handles.axes2); %Ubico el axes2 de
la interfas grafica
set(handles.axes2);
ezplot (Zeq); %Grafico la
secuencia de entrada
title('Se_al') %t_tulo de Cuadr_ula
grid on
ylabel('x(n)') %Nombre eje Y
xlabel('n') %Nombre eje X

DFTF
function varargout = DTFT(varargin)
% DTFT M-file for DTFT.fig
% DTFT, by itself, creates a new DTFT or raises the
existing
% singleton*.
%
% H = DTFT returns the handle to a new DTFT or the
handle to
% the existing singleton*.
%
% DTFT('CALLBACK',hObject,eventData,handles,...) calls
the local
% function named CALLBACK in DTFT.M with the given input
arguments.
%
UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

% DTFT('Property','Value',...) creates a new DTFT or


raises the
% existing singleton*. Starting from the left, property
value pairs are
% applied to the GUI before DTFT_OpeningFcn gets called.
An
% unrecognized property name or invalid value makes
property application
% stop. All inputs are passed to DTFT_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 DTFT

% Last Modified by GUIDE v2.5 16-Feb-2016 22:56:14

% Begin initialization code - DO NOT EDIT


gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @DTFT_OpeningFcn, ...
'gui_OutputFcn', @DTFT_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 DTFT is made visible.


function DTFT_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 DTFT (see VARARGIN)

% Choose default command line output for DTFT


handles.output = hObject;

UNIVERSIDAD TCNICA DE AMBATO


FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

% Update handles structure


guidata(hObject, handles);

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


% uiwait(handles.figure1);

% --- Outputs from this function are returned to the command


line.
function varargout = DTFT_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 popupmenu1.


function popupmenu1_Callback(hObject, eventdata, handles)
% hObject handle to popupmenu1 (see GCBO)
% eventdata reserved - to be defined in a future version of
MATLAB
% handles structure with handles and user data (see
GUIDATA)
inf=get(hObject,'Value');
switch inf
case 1
dtft1
case 2
dtft2
case 3
dtft3
end

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


popupmenu1 contents as cell array
% contents{get(hObject,'Value')} returns selected item
from popupmenu1

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


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

% Hint: popupmenu controls usually have a white background on


Windows.
% See ISPC and COMPUTER.
UNIVERSIDAD TCNICA DE AMBATO
FACULTAD DE INGENIERA EN SISTEMAS, ELECTRNICA E INDUSTRIAL
CARRERA DE INGENIERA EN ELECTRNICA Y COMUNICACIONES.
PERODO ACADMICO: ABRIL 2016 AGOSTO 2016

if ispc && isequal(get(hObject,'BackgroundColor'),


get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

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


properties.
function axes1_CreateFcn(hObject, eventdata, handles)
% hObject handle to axes1 (see GCBO)
% eventdata reserved - to be defined in a future version of
MATLAB
% handles empty - handles not created until after all
CreateFcns called
im=imread('dtft imagen.jpg');
image(im)
axis off

% Hint: place code in OpeningFcn to populate axes1

% --- 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(DTFT)

Vous aimerez peut-être aussi