% Initialization steps.
format long g;
format compact;
fontSize = 12;
%% definice dat
dbmax=-5 %[dB]
dbmin=-35

x=1:1:length(FILTSOUB1(1,:))

maximum=max(abs(FILTSOUB1(1,:)))
hladina=10*log10((FILTSOUB1(1,:)./maximum).^2)

yy1 = smooth(x,hladina,0.010,'loess');

yy11=yy1%-max(yy1)

T=0.9
t2=0:1/fs:T-1/fs;
x=t2;
y=hladina(1:length(t2));
%% GRAF
plot(x, y, 'color',[0.75 0.75 0], 'LineWidth', 0.4);
xlabel('t (s)', 'FontSize', fontSize);
ylabel('L (dB)', 'FontSize', fontSize);
	xlim([0 T]);
    ylim([-70 0]);

xlimits=xlim;
% cela obrazovka
set(gcf, 'Units', 'Normalized', 'OuterPosition', [0 0 1 1]);
set(gca,'FontSize',fontSize)

%set(gcf, 'Name', 'Demo by ImageAnalyst', 'NumberTitle', 'Off') 
line([0,T],[dbmin,dbmin],'Color',[.4,.4,.4],'LineWidth',.5);
line([0,T],[dbmax,dbmax],'Color',[.4,.4,.4],'LineWidth',.5);
line([0,T],[-25,-25],'Color',[.4,.4,.4],'LineWidth',.5);

%legend('Namerena krivka', 'Location', 'Northeast');
%set(legend,'FontSize',7);

r = 150; % pixels per inch
set(gcf, 'PaperUnits', 'inches', 'PaperPosition', [0 0 1080 480]/r);
print(gcf,'-depsc');

%fig2texPS;
