Universidad Centroamericana
Facultad de Ciencia, Tecnología y Ambiente
Facultad de Ciencia, Tecnología y Ambiente
Fundamentos de las Telecomunicaciones – Grupo 0395
Tema:
Informe de Laboratorio no. 4 – Grafica de diversas funciones
Fecha de entrega: domingo 29 de julio del 2012
Elaborado por:
- César Lenín Martínez Pérez
Docente: Milciades Delgadillo Sánchez
Resultados y Discusión
I) El siguiente programa realiza la gráfica de la función seno.
t=-4:0.001:4;
A=1
f=0.25
y=A*sin(2*pi*f*t);
plot (t, y), grid on, title('Grafica del Seno [con plot]'), xlabel('eje(t)'), ylabel('eje(y)')
A=1
f=0.25
y=A*sin(2*pi*f*t);
plot (t, y), grid on, title('Grafica del Seno [con plot]'), xlabel('eje(t)'), ylabel('eje(y)')
Este conjunto de instrucciones de MATLAB realizan una grafica de la función seno (2πft), con el dominio de -4 a 4. Utiliza el comando plot para graficar. Los siguientes ejemplos muestran otras formas de graficar con diferentes instrucciones.
- Con fplot
La función fplot admite como argumento un nombre de función o un nombre de fichero *.m
en el cual esté definida una función de usuario. La función
puede ser escalar (un único resultado por cada valor de x) o vectorial (García de Jalón, Rodríguez, & Vidal, 2005, pág. 116).
En
este ejemplo, la función fplot llama al fichero “seno.m”, para que le
devuelva un conjunto de valores que utilizara para hacer una grafica.
fplot('seno(x)', [-4 4], 'g'), grid on, title('Grafica de la Función Seno [con fplot]'), xlabel('eje (t)'), ylabel('eje (y)')
El siguiente texto muestra el contenido del fichero seno.m:
function y=seno(x)
f=0.25;
y(:,1)=sin(2*pi*f*x);
f=0.25;
y(:,1)=sin(2*pi*f*x);
La función recibe de parte del comando fplot un
vector x con valores que van desde -4 a 4. Entonces la función
devolverá un vector (matriz de una fila) con valores de y, dados por la
formula y= seno (2πft). Estos valores son utilizados por el comando
para realizar la grafica.
- Con ezplot
El comando ezplot se utiliza cuando se quiere obtener rápidamente la grafica de una función, solo se le transfiere la ecuación y su dominio.
- Con ezsurf
Esta instrucción es muy similar a ezplot, su diferencia es que, la grafica la realiza con tres dimensiones aunque solo le sean transferidas dos.
II) Hacer uso de los siguientes comandos:
Hold on: Permite graficar dos funciones en una misma ventana. Graficar una función seno y una función coseno. En la grafica resultante aparecen dos funciones en un mismo eje de coordenadas.
Hold on: Permite graficar dos funciones en una misma ventana. Graficar una función seno y una función coseno. En la grafica resultante aparecen dos funciones en un mismo eje de coordenadas.
hold on
ezplot('sin(2*pi*0.25*t)', [-4 4]), grid on, title('Grafica del Seno'), xlabel('eje (t)'), ylabel('eje (y)')
ezplot('cos(2*pi*0.25*t)', [-4 4]), grid on, title('Grafica del Seno y Coseno [Desfasada 90 Grados]'), xlabel('eje (t)'), ylabel('eje (y)')
ezplot('sin(2*pi*0.25*t)', [-4 4]), grid on, title('Grafica del Seno'), xlabel('eje (t)'), ylabel('eje (y)')
ezplot('cos(2*pi*0.25*t)', [-4 4]), grid on, title('Grafica del Seno y Coseno [Desfasada 90 Grados]'), xlabel('eje (t)'), ylabel('eje (y)')
Figure (n): Permite graficar cada función en ventanas diferentes. Dentro del paréntesis se pone el número de figura.
figure(3)
plot(t, y), title('Funcion Seno')
plot(t, y), title('Funcion Seno')
En este caso, el grafico apareció en una ventana diferente.
Ejecutar el comando "help elfun" y graficar las funciones básicas.
>>help elfun
help elfun
Elementary math functions.
Trigonometric.
sin - Sine
sind - Sine of argument in degrees.
sinh - Hyperbolic sine.
asin - Inverse sine.
asind - Inverse sine, result in degrees.
asinh - Inverse hyperbolic sine.
cos - Cosine.
cosd - Cosine of argument in degrees.
cosh - Hyperbolic cosine.
acos - Inverse cosine.
acosd - Inverse cosine, result in degrees.
acosh - Inverse hyperbolic cosine.
tan - Tangent.
tand - Tangent of argument in degrees.
tanh - Hyperbolic tangent.
atan - Inverse tangent.
atand - Inverse tangent, result in degrees.
atan2 - Four quadrant inverse tangent.
atanh - Inverse hyperbolic tangent.
sec - Secant.
secd - Secant of argument in degrees.
sech - Hyperbolic secant.
asec - Inverse secant.
asecd - Inverse secant, result in degrees.
asech - Inverse hyperbolic secant.
csc - Cosecant.
cscd - Cosecant of argument in degrees.
csch - Hyperbolic cosecant.
acsc - Inverse cosecant.
acscd - Inverse cosecant, result in degrees.
acsch - Inverse hyperbolic cosecant.
cot - Cotangent.
cotd - Cotangent of argument in degrees.
coth - Hyperbolic cotangent.
acot - Inverse cotangent.
acotd - Inverse cotangent, result in degrees.
acoth - Inverse hyperbolic cotangent.
hypot - Square root of sum of squares.
Exponential.
exp - Exponential.
expm1 - Compute exp(x)-1 accurately.
log - Natural logarithm.
log1p - Compute log(1+x) accurately.
log10 - Common (base 10) logarithm.
log2 - Base 2 logarithm and dissect floating point number.
pow2 - Base 2 power and scale floating point number.
realpow - Power that will error out on complex result.
reallog - Natural logarithm of real number.
realsqrt - Square root of number greater than or equal to zero.
sqrt - Square root.
nthroot - Real n-th root of real numbers.
nextpow2 - Next higher power of 2.
Complex.
abs - Absolute value.
angle - Phase angle.
complex - Construct complex data from real and imaginary parts.
conj - Complex conjugate.
imag - Complex imaginary part.
real - Complex real part.
unwrap - Unwrap phase angle.
isreal - True for real array.
cplxpair - Sort numbers into complex conjugate pairs.
Rounding and remainder.
fix - Round towards zero.
floor - Round towards minus infinity.
ceil - Round towards plus infinity.
round - Round towards nearest integer.
mod - Modulus (signed remainder after division).
rem - Remainder after division.
sign - Signum.
help elfun
Elementary math functions.
Trigonometric.
sin - Sine
sind - Sine of argument in degrees.
sinh - Hyperbolic sine.
asin - Inverse sine.
asind - Inverse sine, result in degrees.
asinh - Inverse hyperbolic sine.
cos - Cosine.
cosd - Cosine of argument in degrees.
cosh - Hyperbolic cosine.
acos - Inverse cosine.
acosd - Inverse cosine, result in degrees.
acosh - Inverse hyperbolic cosine.
tan - Tangent.
tand - Tangent of argument in degrees.
tanh - Hyperbolic tangent.
atan - Inverse tangent.
atand - Inverse tangent, result in degrees.
atan2 - Four quadrant inverse tangent.
atanh - Inverse hyperbolic tangent.
sec - Secant.
secd - Secant of argument in degrees.
sech - Hyperbolic secant.
asec - Inverse secant.
asecd - Inverse secant, result in degrees.
asech - Inverse hyperbolic secant.
csc - Cosecant.
cscd - Cosecant of argument in degrees.
csch - Hyperbolic cosecant.
acsc - Inverse cosecant.
acscd - Inverse cosecant, result in degrees.
acsch - Inverse hyperbolic cosecant.
cot - Cotangent.
cotd - Cotangent of argument in degrees.
coth - Hyperbolic cotangent.
acot - Inverse cotangent.
acotd - Inverse cotangent, result in degrees.
acoth - Inverse hyperbolic cotangent.
hypot - Square root of sum of squares.
Exponential.
exp - Exponential.
expm1 - Compute exp(x)-1 accurately.
log - Natural logarithm.
log1p - Compute log(1+x) accurately.
log10 - Common (base 10) logarithm.
log2 - Base 2 logarithm and dissect floating point number.
pow2 - Base 2 power and scale floating point number.
realpow - Power that will error out on complex result.
reallog - Natural logarithm of real number.
realsqrt - Square root of number greater than or equal to zero.
sqrt - Square root.
nthroot - Real n-th root of real numbers.
nextpow2 - Next higher power of 2.
Complex.
abs - Absolute value.
angle - Phase angle.
complex - Construct complex data from real and imaginary parts.
conj - Complex conjugate.
imag - Complex imaginary part.
real - Complex real part.
unwrap - Unwrap phase angle.
isreal - True for real array.
cplxpair - Sort numbers into complex conjugate pairs.
Rounding and remainder.
fix - Round towards zero.
floor - Round towards minus infinity.
ceil - Round towards plus infinity.
round - Round towards nearest integer.
mod - Modulus (signed remainder after division).
rem - Remainder after division.
sign - Signum.
- En la sección de anexos aparece codigo fuente de la función graficos_fe, contenido en el fichero graficos_fe.m. Al crear este documento y ejecutar en MATLAB el comando graficos_fe, automaticamente se crearan 67 graficas de las funciones elementales que maneja este programa
Subplot (m, n, p): Donde m = filas,
n= columnas y p= vector de posición de la gráfica. Graficar la función
seno y coseno en diferentes subplot, expresar la suma de ambas
funciones en otro subplot.
hold off
z=cos(2*pi*f*t);
subplot(1,2,1), plot(t, y), grid on, title('Seno')
subplot(1,2,2), plot(t, z), grid on, title('Coseno')
z=cos(2*pi*f*t);
subplot(1,2,1), plot(t, y), grid on, title('Seno')
subplot(1,2,2), plot(t, z), grid on, title('Coseno')
subplot(2,2,1), plot(t, y), grid on, title('Seno')
subplot(2,2,2), plot(t, z), grid on, title('Coseno')
subplot(2,2,3), plot(t, y), grid on, title('Coseno y Seno'), hold on
subplot(2,2,3), plot(t, z), grid on, title('Coseno y Seno'), hold on
yz=y+z;
subplot(2,2,4), plot(t, yz), grid on, title('Suma de las dos funciones')
subplot(2,2,2), plot(t, z), grid on, title('Coseno')
subplot(2,2,3), plot(t, y), grid on, title('Coseno y Seno'), hold on
subplot(2,2,3), plot(t, z), grid on, title('Coseno y Seno'), hold on
yz=y+z;
subplot(2,2,4), plot(t, yz), grid on, title('Suma de las dos funciones')
Axis ( [Xmin Xmax Ymin Ymax]) Redimensiona los ejes X y Y.
Graficar la función x=exp(-.1*t).*sin(2/3*t) redimensionando el Eje X de 0 30 y el Eje Y de -1 a 1.
x=exp(-.1*t).*sin(2/3*t);
plot (t, x, 'g'), title('Función exponencial'), grid on
axis([0 30 -1 1])
Graficar la función x=exp(-.1*t).*sin(2/3*t) redimensionando el Eje X de 0 30 y el Eje Y de -1 a 1.
x=exp(-.1*t).*sin(2/3*t);
plot (t, x, 'g'), title('Función exponencial'), grid on
axis([0 30 -1 1])
En la primera
grafica se puede observar la función en su dominio total, en la segunda
solo se puede observar una parte de ella debido a que se muestra otra
sección del eje de coordenadas.
III) El siguiente programa hace uso del comando "input" para solicitar datos al usuario.
function ejercicio3
clc
clear all
x=-4:0.001:4;
Amplitud1=input('Introduzca la primera Amplitud: ');
Amplitud2=input('Introduzca la segunda Amplitud: ');
y1=Amplitud1*sin(x);
y2=Amplitud2*cos(x);
plot(x, y1, 'ro')
hold on
plot(x, y2, 'g')
clc
Este texto está contenido en el fichero
ejercicio3.m. Al escribir en la línea de comandos ejercicio3, todas las
instrucciones se ejecutan. El programa borra la pantalla y elimina las
variables con las que está trabajando MATLAB. Luego solicita los
valores de las variables Amplitud1 y Amplitud2. Realiza los cálculos de
las variables “y”, para almacenarlos en un vector. Luego en un mismo
eje de coordenadas aparecen las dos graficas:clc
clear all
x=-4:0.001:4;
Amplitud1=input('Introduzca la primera Amplitud: ');
Amplitud2=input('Introduzca la segunda Amplitud: ');
y1=Amplitud1*sin(x);
y2=Amplitud2*cos(x);
plot(x, y1, 'ro')
hold on
plot(x, y2, 'g')
clc
- Modificar el programa anterior haciendo uso de subplot, figure, hold on, axis, grid on, title, xlabel, ylabel.
clc
clear all
x=-4:0.001:4;
Amplitud1=input('Introduzca la primera Amplitud: ');
Amplitud2=input('Introduzca la segunda Amplitud: ');
y1=Amplitud1*sin(x);
y2=Amplitud2*cos(x);
figure(1)
plot(x, y1, 'ro')
hold on
grid on
plot(x, y2, 'g'), title('Grafica de la función seno (rojo) y coseno (verde), con diversas amplitudes'), xlabel('Dominio'), ylabel('Amplitud')
figure(2)
subplot(2,2,3), hold on, plot(x, y1, 'ro'),plot(x, y2, 'g'),grid on, title('Seno (rojo) y Coseno (verde)'), xlabel('Dominio'), ylabel('Amplitud')
subplot(2,2,4), hold on, plot(x, y1, 'ro'),plot(x, y2, 'g'),grid on, title('Seno (rojo) y Coseno (verde)'), xlabel('Dominio (Solo de -3 a 3)'), ylabel('Amplitud (Solo de -10 10)'), axis ([-3.14 3.14 -10 10])
hold off
subplot(2,2,1), plot(x, y1, 'ro'), grid on, title('Funcion Seno de Amplitud variable')
subplot(2,2,2), plot(x, y2, 'g'), grid on, title('Funcion Coseno de Amplitud variable')
clc
Este programa dibuja dos figuras. La primera traza
en un mismo eje de coordenadas una función seno y coseno. La segunda,
por medio del comando subplot dibuja cuatro figuras en un solo espacio.
Se muestra: 1. Función Seno de Amplitud variable, 2. Función Coseno
de Amplitud variable, 3. Seno (rojo) y Coseno (verde), 4. Pedazo de las
dos graficas que va en x desde -3 a 3 y en y desde -10 10 [con la
instrucción axis].
IV) El siguiente programa emite un sonido a una frecuencia determinada a través del comando "sound”.
function sound
t=-4:0.001:4;
A=1;
f=100;
y=A*sin(2*pi*f*t);
sound(y,8192)
% 8192 Hz es la frecuencia de muestreo que se utiliza por defecto en MATLAB para producir los sonidos
clc
t=-4:0.001:4;
A=1;
f=100;
y=A*sin(2*pi*f*t);
sound(y,8192)
% 8192 Hz es la frecuencia de muestreo que se utiliza por defecto en MATLAB para producir los sonidos
clc
Este programa produce un sonido con frecuencia de
100 Hz. Es claro que un sonido no se puede imprimir en papel, pero si
escribe la función sound y la ejecuta en la línea de comandos,
escuchara el pitido.
- Elaborar un programa donde el usuario pueda seleccionar diferentes frecuencias de sonido para la gráfica.
clc
t=-4:0.001:4;
A=1;
f=input('Introduzca la Frecuencia del sonido: ');
y=A*sin(2*pi*f*t);
sound(y,8192)
clc
El código permite cambiar la frecuencia del sonido que se escuchara, al ser posible modificar la frecuencia.
V) Realizar la gráfica de la siguiente función y (t)=0.9*sin (pi*f*t) + 0.3*sin (3*pi*f*t).
V) Realizar la gráfica de la siguiente función y (t)=0.9*sin (pi*f*t) + 0.3*sin (3*pi*f*t).
function ejercicio5
clc
clear all
t=-1:0.001:1;
f=input('Introduzca la Frecuencia: ');
y1=0.9*sin(pi*f*t);
y2=0.3*sin(3*pi*f*t);
y3=y1+y2;
figure(1)
plot(t, y1, 'g'), grid on, title('Grafica de la función y(t)=0.9*sin(pi*f*t)'), xlabel('Tiempo'), ylabel('Amplitud')
sound(y1,8192)
figure(2)
plot(t, y2, 'g'), grid on, title('Grafica de la función y(t)=0.3*sin(3*pi*f*t)'), xlabel('Tiempo'), ylabel('Amplitud')
sound(y2,8192)
figure(3)
plot(t, y3, 'ro'), grid on, title('Grafica de la función y(t)=0.9*sin(pi*f*t)+0.3*sin(3*pi*f*t)'), xlabel('Tiempo'), ylabel('Amplitud')
sound(y3,8192)
clc
clc
clear all
t=-1:0.001:1;
f=input('Introduzca la Frecuencia: ');
y1=0.9*sin(pi*f*t);
y2=0.3*sin(3*pi*f*t);
y3=y1+y2;
figure(1)
plot(t, y1, 'g'), grid on, title('Grafica de la función y(t)=0.9*sin(pi*f*t)'), xlabel('Tiempo'), ylabel('Amplitud')
sound(y1,8192)
figure(2)
plot(t, y2, 'g'), grid on, title('Grafica de la función y(t)=0.3*sin(3*pi*f*t)'), xlabel('Tiempo'), ylabel('Amplitud')
sound(y2,8192)
figure(3)
plot(t, y3, 'ro'), grid on, title('Grafica de la función y(t)=0.9*sin(pi*f*t)+0.3*sin(3*pi*f*t)'), xlabel('Tiempo'), ylabel('Amplitud')
sound(y3,8192)
clc
Este programa dibuja tres figuras en tres ventanas
diferentes. A la vez que dibuja la grafica, emite un sonido
correspondiente al valor instantáneo de la variable y. Cabe destacar
que la frecuencia en este caso es 10 Hz.
VI) El comando "stem" es utilizado para graficar señales discretas, por ejemplo:
function ejercicio6
clc
clear all
n=-4:30;
y=exp(-0.1*n).*sin(2/3*n);
stem (n, y);
grid on
title('Función y=exp(-0.1*n).*sin(2/3*n)'), xlabel('Dominio'), ylabel('Amplitud de la onda')
clc
clc
clear all
n=-4:30;
y=exp(-0.1*n).*sin(2/3*n);
stem (n, y);
grid on
title('Función y=exp(-0.1*n).*sin(2/3*n)'), xlabel('Dominio'), ylabel('Amplitud de la onda')
clc
- Graficar la función coseno discreta para diferentes valores de Wo menores que "pi".
clc
clear all
n=-30:1:pi;
y=exp(-0.1*n).*cos(2/3*n);
stem (n, y);
grid on
title('Función y=exp(-0.1*n).*cos(2/3*n)'), xlabel('Dominio'), ylabel('Amplitud de la onda')
clc
Esta función amortiguada muestra valores que van desde -30 a 3.14 (π)
Bibliografía
García de Jalón, J., Rodríguez, J. I., & Vidal, J. (2005). Aprenda Matlab 7.0 como si estuviera en primero. Madrid: Escuela Técnica Superior de Ingenieros Industriales - Universidad Politécnica de Madrid.
Anexos
Graficas de las funciones elementales. Para observar
las graficas de las funciones elementales debe crear el archivo
graficos_fe.m y guardarlo en la carpeta de documentos prdeterminada de
MATLAB. Luego, en la linea de comandos escribe:
>>graficos_fe
Y automaticamente apareceran las 67 graficas de las funciones elementales
function graficos_fe
%Trigonometric
x=-4:0.001:4;
figure, plot(x, (sin(x))), title('sin'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (sind(x))), title('sind'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (sinh(x))), title('sinh'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (asin(x))), title('asin'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (asind(x))), title('asind'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (asinh(x))), title('asinh'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (cos(x))), title('cos'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (cosd(x))), title('cosd'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (cosh(x))), title('cosh'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (acos(x))), title('acos'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (acosd(x))), title('acosd'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (acosh(x))), title('acosh'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (tan(x))), title('tan'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (tand(x))), title('tand'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (tanh(x))), title('tanh'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (atan(x))), title('atan'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (atand(x))), title('atand'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (atan2(x, x))), title('atan2'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (atanh(x))), title('atanh'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (sec(x))), title('sec'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (secd(x))), title('secd'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (sech(x))), title('sech'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (asec(x))), title('asec'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (asecd(x))), title('asecd'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (asech(x))), title('asech'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (csc(x))), title('csc'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (cscd(x))), title('cscd'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (csch(x))), title('csch'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (acsc(x))), title('acsc'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (acscd(x))), title('acscd'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (acsch(x))), title('acsch'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (cot(x))), title('cot'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (cotd(x))), title('cotd'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (coth(x))), title('coth'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (acot(x))), title('acot'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (acotd(x))), title('acotd'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (acoth(x))), title('acoth'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (hypot(x, x))), title('hypot'), grid on, xlabel('Dominio'), ylabel('Amplitud')
%Exponential
figure, plot(x, (exp(x))), title('exp'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (expm1(x))), title('expm1'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (log(x))), title('log'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (log1p(x))), title('log1p'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (log10(x))), title('log10'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (log2(x))), title('log2'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (pow2(x))), title('pow2'), grid on, xlabel('Dominio'), ylabel('Amplitud')
z=0:0.001:4;
figure, plot(z, (realpow(z, z))), title('realpow'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(z, (reallog(z))), title('reallog'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(z, (realsqrt(z))), title('realsqrt'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(z, (sqrt(z))), title('sqrt'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(z, (nthroot(z, 5))), title('nthroot'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(z, (nextpow2(z))), title('nextpow2'), grid on, xlabel('Dominio'), ylabel('Amplitud')
%Complex
figure, plot(x, (abs(x))), title('abs'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (angle(x))), title('angle'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (complex(x))), title('complex'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (conj(x))), title('conj'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (max(x))), title('imax no existe, max si'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (real(x))), title('real'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (unwrap(x))), title('unwrap'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (isreal(x))), title('isreal'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (cplxpair(x))), title('cplxpair'), grid on, xlabel('Dominio'), ylabel('Amplitud')
%Rounding and remainder
figure, plot(x, (fix(x))), title('fix'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (floor(x))), title('floor'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (ceil(x))), title('ceil'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (round(x))), title('round'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (sign(x))), title('sign'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (mod(x, x))), title('mod'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (rem(x, x))), title('rem'), grid on, xlabel('Dominio'), ylabel('Amplitud')
%Trigonometric
x=-4:0.001:4;
figure, plot(x, (sin(x))), title('sin'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (sind(x))), title('sind'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (sinh(x))), title('sinh'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (asin(x))), title('asin'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (asind(x))), title('asind'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (asinh(x))), title('asinh'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (cos(x))), title('cos'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (cosd(x))), title('cosd'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (cosh(x))), title('cosh'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (acos(x))), title('acos'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (acosd(x))), title('acosd'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (acosh(x))), title('acosh'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (tan(x))), title('tan'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (tand(x))), title('tand'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (tanh(x))), title('tanh'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (atan(x))), title('atan'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (atand(x))), title('atand'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (atan2(x, x))), title('atan2'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (atanh(x))), title('atanh'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (sec(x))), title('sec'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (secd(x))), title('secd'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (sech(x))), title('sech'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (asec(x))), title('asec'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (asecd(x))), title('asecd'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (asech(x))), title('asech'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (csc(x))), title('csc'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (cscd(x))), title('cscd'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (csch(x))), title('csch'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (acsc(x))), title('acsc'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (acscd(x))), title('acscd'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (acsch(x))), title('acsch'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (cot(x))), title('cot'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (cotd(x))), title('cotd'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (coth(x))), title('coth'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (acot(x))), title('acot'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (acotd(x))), title('acotd'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (acoth(x))), title('acoth'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (hypot(x, x))), title('hypot'), grid on, xlabel('Dominio'), ylabel('Amplitud')
%Exponential
figure, plot(x, (exp(x))), title('exp'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (expm1(x))), title('expm1'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (log(x))), title('log'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (log1p(x))), title('log1p'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (log10(x))), title('log10'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (log2(x))), title('log2'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (pow2(x))), title('pow2'), grid on, xlabel('Dominio'), ylabel('Amplitud')
z=0:0.001:4;
figure, plot(z, (realpow(z, z))), title('realpow'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(z, (reallog(z))), title('reallog'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(z, (realsqrt(z))), title('realsqrt'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(z, (sqrt(z))), title('sqrt'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(z, (nthroot(z, 5))), title('nthroot'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(z, (nextpow2(z))), title('nextpow2'), grid on, xlabel('Dominio'), ylabel('Amplitud')
%Complex
figure, plot(x, (abs(x))), title('abs'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (angle(x))), title('angle'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (complex(x))), title('complex'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (conj(x))), title('conj'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (max(x))), title('imax no existe, max si'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (real(x))), title('real'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (unwrap(x))), title('unwrap'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (isreal(x))), title('isreal'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (cplxpair(x))), title('cplxpair'), grid on, xlabel('Dominio'), ylabel('Amplitud')
%Rounding and remainder
figure, plot(x, (fix(x))), title('fix'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (floor(x))), title('floor'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (ceil(x))), title('ceil'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (round(x))), title('round'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (sign(x))), title('sign'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (mod(x, x))), title('mod'), grid on, xlabel('Dominio'), ylabel('Amplitud')
figure, plot(x, (rem(x, x))), title('rem'), grid on, xlabel('Dominio'), ylabel('Amplitud')
clc
