Скачиваний:
29
Добавлен:
08.04.2022
Размер:
1 Кб
Скачать
clc
close all
clear all

Fs=350;
tmax=0.8;
F=42;
T=1/Fs;

t=0:T:tmax-T;
M=5;
A(1:M)=[4 3 6 1 4];
C(1:M)=[-4 0 1 -30 0.9];
for i=1:M
    Signal(:,i)=A(i)*sin(2*pi*F*t(:)-(i-1)*pi/4)+C(i);
end

figure
subplot(2,1,1)
dy=10;
for i=1:M
    plot(t,Signal(:,i)-i*dy)
    hold on
end
title('Графики тестовых сигналов')

subplot(2,1,2)
R=corrcoef(Signal);
Ra=zeros(M+1,M+1);
Ra(1:M,1:M)=R;
pcolor(Ra)
colormap(gray)
axis ij
axis square
title('КВК тестовых сигналов')

figure
subplot(1,2,1)
Limit=0.5;
for i=1:M
    for j=1:M
        if R(i,j)>Limit
            R1(i,j)=1;
        else
            R1(i,j)=0;
        end
    end
end
Ra1=zeros(M+1,M+1);
Ra1(1:M,1:M)=R1;
pcolor(Ra1)
colormap(gray)
axis ij
axis square
title('КВК тестовых сигналов, порог = 0.5')

subplot(1,2,2)
Limit=0.85;
for i=1:M
    for j=1:M
        if R(i,j)>Limit
            R2(i,j)=1;
        else
            R2(i,j)=0;
        end
    end
end
Ra2=zeros(M+1,M+1);
Ra2(1:M,1:M)=R2;
pcolor(Ra2)
colormap(gray)
axis ij
axis square
title('КВК тестовых сигналов, порог = 0.85')
Соседние файлы в папке Лаба 7