semestralka
This commit is contained in:
33
hod3/2.m
Normal file
33
hod3/2.m
Normal file
@@ -0,0 +1,33 @@
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user