34 lines
300 B
Matlab
34 lines
300 B
Matlab
clc;
|
|
close all;
|
|
|
|
max_val = 99
|
|
n = 0:max_val
|
|
f = 0.05
|
|
% x = (x^5-x^3+x^2-1)*(x^6-2);
|
|
%
|
|
% Konvolucia
|
|
a = sin(2*pi*f*n)
|
|
|
|
b = sin(2*pi*f*n+0.5)
|
|
c = conv(a,b)
|
|
|
|
|
|
figure;
|
|
stem(a)
|
|
hold on;
|
|
stem(b)
|
|
|
|
figure;
|
|
stem(c)
|
|
|
|
figure;
|
|
% Korelacia
|
|
R = xcorr(a,b)
|
|
stem(R)
|
|
|
|
figure;
|
|
% AutoKorelacia
|
|
T = autocorr(a)
|
|
stem(T)
|
|
|