lose all;
clear all;
clc;
%% Script of plotting of power spectrums of Jansen's signals
%
%% Description
%
% In that script results of the power spectral analysis are loaded and then
% they are plotted in figured
%
%% Overview of results of the power spectral analysis 
%
% spectra_jansen1S1_K1_50.mat, w_jansen1S1.mat
% spectra_jansen1S2_K1_50.mat, w_jansen1S1.mat
% spectra_jansen2S1_K1_7000.mat, w_jansen2S1.mat
% spectra_jansen2S2_K1_7000.mat, w_jansen2S2.mat
%
%% Loading a couple of results of the power spectral analysis of one Jansen's signal
%
load spectra_jansen2S2_K1_7000.mat
load w_jansen2S2.mat
%
%% Plotting of these results in figure
%
figure
plot(w(1,1:(end-1)),final{1,1})
hold on
plot(w(1,1:(end-1)),final{1,2},'r')
hold on
plot(w(1,1:(end-1)),final{1,3},'y')
hold on
plot(w(1,1:(end-1)),final{1,4},'g')
title('|XN(w)|')
xlabel('Frequency [rad/s]')
ylabel('Magnitude')
