Professional Documents
Culture Documents
close all
clear all
npts = 100;
t = linspace(0, 2*pi, npts)
y = rand(npts,1)
%y = y + sin(t)
figure, plot(t',y)
grid
close all
clear all
npts = 1000;
t = linspace(0, 2*pi, npts);
y = rand(1, npts ) + sin(t);
figure, plot(t,y)
%figure, stem(t,y)
grid
close all
clear all
npts = 1000;
t = linspace(0, 8*pi, npts);
%y = ( rand(1, npts ) + sin(t) ) .*exp(-0.5* t);
y = ( cos(t) ) .*exp(-0.1* t);
figure, plot(t,y)
%figure, stem(t,y)
grid
clear all
close all
%probando el diagrama de Farley
f = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];
g = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];
h=conv(f,g);
figure(1)
subplot(3,1,1)
stem(f)
subplot(3,1,2)
stem(g)
subplot(3,1,3)
plot(h,'.-')
clc
close all
clear all
% definir una function
fun = @(x)sinc(x);
npts = 1000;
x = linspace(-100,100, npts);
format long
q1 = integral(fun,-1000,1000)
plot(x, fun(x) )
grid on
clc
close all
clear all
format long
a = 10
fun = @(y)sinc(y*a);
npts = 10000;
x = linspace(-100,100, npts);
q1 = integral(fun,-1000,1000)
FFT_f = fft(fun(x))
figure,subplot(2,1,1)
plot(x, fun(x) )
grid on
title("Sinc en el tiempo")
subplot(2,1,2)
grid on
title("Sinc en frecuencia")
close all
clear all
format long
a = 10
%fun = @(y)sinc(y*a);
npts = 10000;
x = linspace(-100,100, npts);
q1 = integral(fun,-1000,1000)
FFT_f = fft(fun(x))
figure,subplot(2,1,1)
plot(x, fun(x) )
grid on
title("Sinc en el tiempo")
subplot(2,1,2)
grid on
title("Sinc en frecuencia")
Clc
close all;
clear all;
N = 1024;
freq1 = 1e4;
freq2 = 1e3;
T1 = 1/freq1;
S1 = 30*T1;
t1 = 0:(1/N)*S1:S1;
%t1 = linspace(0,S1, N) ;
y_10k = sin(2*pi*freq1*t1 );
y_1k = sin(2*pi*freq2*t1 );
w = conv(y_10k, y_1k)
%figure
%plot(t1,y_10k);
Figure
plot(w);