freqsW3=freq3;
win=ones(1,floor(n/naverage));
[power4 freq4]=pwelch(data(4,:),floor(2*n/(naverage+1)),[],[],Fd);
powersW4=power4;
freqsW4=freq4;
%% Нарисуем эти мощности
figure;
subplot(2,2,1);
plot(FreqsWO1,20*log(PowersWO1));
title(['S/N=' num2str(S2N(1)) ' dB; without average, resolution: ' num2str(Fd/2/length(FreqsWO1)) ' Гц']);
xlabel('Frequency, Hz');
ylabel('Power density, Wt/Hz');
subplot(2,2,2);
plot(FreqsW1,20*log(PowersW1));
title(['S/N=' num2str(S2N(1)) ' dB; with average, resolution: ' num2str(Fd/2/length(FreqsW1)) ' Гц']);
xlabel('Frequency, Hz');
ylabel('Power density, Wt/Hz');
subplot(2,2,3);
plot(freqsWO1,20*log(powersWO1));
title(['S/N=' num2str(S2N(1)) ' dB; without average, resolution: ' num2str(Fd/2/length(freqsWO1)) ' Гц']);
xlabel('Frequency, Hz');
ylabel('Power density, Wt/Hz');
subplot(2,2,4);
plot(freqsW1,20*log(powersW1));
title(['S/N=' num2str(S2N(1)) ' dB; with average, resolution: ' num2str(Fd/2/length(freqsW1)) ' Гц']);
xlabel('Frequency, Hz');
ylabel('Power density, Wt/Hz');
figure;
subplot(2,2,1);
plot(FreqsWO2,20*log(PowersWO2));
title(['S/N=' num2str(S2N(2)) ' dB; without average, resolution: ' num2str(Fd/2/length(FreqsWO2(i,:))) ' Гц']);
xlabel('Frequency, Hz');
ylabel('Power density, Wt/Hz');
subplot(2,2,2);
plot(FreqsW2,20*log(PowersW2));
title(['S/N=' num2str(S2N(2)) ' dB; with average, resolution: ' num2str(Fd/2/length(FreqsW2(i,:))) ' Гц ']);
xlabel('Frequency, Hz');
ylabel('Power density, Wt/Hz');
subplot(2,2,3);
plot(freqsWO2,20*log(powersWO2));
title(['S/N=' num2str(S2N(2)) ' dB; without average, resolution: ' num2str(Fd/2/length(freqsWO2(i,:))) ' Гц']);
xlabel('Frequency, Hz');
ylabel('Power density, Wt/Hz');
subplot(2,2,4);
plot(freqsW2,20*log(powersW2));
title(['S/N=' num2str(S2N(2)) ' dB; with average, resolution: ' num2str(Fd/2/length(freqsW2(i,:))) ' Гц']);
xlabel('Frequency, Hz');
ylabel('Power density, Wt/Hz');
figure;
subplot(2,2,1);
plot(FreqsWO3,20*log(PowersWO3));
title(['S/N=' num2str(S2N(3)) ' dB; without average, resolution: ' num2str(Fd/2/length(FreqsWO3(i,:))) ' Гц']);
xlabel('Frequency, Hz');
ylabel('Power density, Wt/Hz');
subplot(2,2,2);
plot(FreqsW3,20*log(PowersW3));
title(['S/N=' num2str(S2N(3)) ' dB; with average, resolution: ' num2str(Fd/2/length(FreqsW3(i,:))) ' Гц']);
xlabel('Frequency, Hz');
ylabel('Power density, Wt/Hz');
subplot(2,2,3);
plot(freqsWO3,20*log(powersWO3));
title(['S/N=' num2str(S2N(3)) ' dB; without average, resolution: ' num2str(Fd/2/length(freqsWO3(i,:))) ' Гц']);
xlabel('Frequency, Hz');
ylabel('Power density, Wt/Hz');
subplot(2,2,4);
plot(freqsW3,20*log(powersW3));
title(['S/N=' num2str(S2N(3)) ' dB; with average, resolution: ' num2str(Fd/2/length(freqsW3(i,:))) ' Гц']);
xlabel('Frequency, Hz');
ylabel('Power density, Wt/Hz');
figure;
subplot(2,2,1);
plot(FreqsWO4,20*log(PowersWO4));
title(['S/N=' num2str(S2N(4)) ' dB; without average, resolution: ' num2str(Fd/2/length(FreqsWO4(i,:))) ' Гц']);
xlabel('Frequency, Hz');
ylabel('Power density, Wt/Hz');
subplot(2,2,2);
plot(FreqsW4,20*log(PowersW4));
title(['S/N=' num2str(S2N(4)) ' dB; with average, resolution: ' num2str(Fd/2/length(FreqsW4(i,:))) ' Гц']);
xlabel('Frequency, Hz');
ylabel('Power density, Wt/Hz');
subplot(2,2,3);
plot(freqsWO4,20*log(powersWO4));
title(['S/N=' num2str(S2N(4)) ' dB; without average, resolution: ' num2str(Fd/2/length(freqsWO4(i,:))) ' Гц']);
xlabel('Frequency, Hz');
ylabel('Power density, Wt/Hz');
subplot(2,2,4);
plot(freqsW4,20*log(powersW4));
title(['S/N=' num2str(S2N(4)) ' dB; with average, resolution: ' num2str(Fd/2/length(freqsW4(i,:))) ' Гц']);
xlabel('Frequency, Hz');
ylabel('Power density, Wt/Hz');
Уважаемый посетитель!
Чтобы распечатать файл, скачайте его (в формате Word).
Ссылка на скачивание - внизу страницы.