clc;
close all;
%% Load 10 identical simulated Hoevers fine crackles here 
load SF1_Hoevers
load SF2_Hoevers
load SF3_Hoevers
load SF4_Hoevers
load SF5_Hoevers
load SF6_Hoevers
load SF7_Hoevers
load SF8_Hoevers
load SF9_Hoevers
load SF10_Hoevers
fs              = 44100;                                                      %% Sampling frequency
Signal_length   = 32768;                                                      %% Signal length
%% Make the length equal
SF1_Hoevers     = [zeros(1,1000),SF1_Hoevers,zeros(1,Signal_length-(1000+length(SF1_Hoevers)))];
SF2_Hoevers     = [zeros(1,3000),SF2_Hoevers,zeros(1,Signal_length-(3000+length(SF2_Hoevers)))];
SF3_Hoevers     = [zeros(1,7000),SF3_Hoevers,zeros(1,Signal_length-(7000+length(SF3_Hoevers)))];
SF4_Hoevers     = [zeros(1,12000),SF4_Hoevers,zeros(1,Signal_length-(12000+length(SF4_Hoevers)))];
SF5_Hoevers     = [zeros(1,14000),SF5_Hoevers,zeros(1,Signal_length-(14000+length(SF5_Hoevers)))];
SF6_Hoevers     = [zeros(1,17000),SF6_Hoevers,zeros(1,Signal_length-(17000+length(SF6_Hoevers)))];
SF7_Hoevers     = [zeros(1,20000),SF7_Hoevers,zeros(1,Signal_length-(20000+length(SF7_Hoevers)))];
SF8_Hoevers     = [zeros(1,23000),SF8_Hoevers,zeros(1,Signal_length-(23000+length(SF8_Hoevers)))];
SF9_Hoevers     = [zeros(1,27500),SF9_Hoevers,zeros(1,Signal_length-(27500+length(SF9_Hoevers)))];
SF10_Hoevers    = [zeros(1,30000),SF10_Hoevers,zeros(1,Signal_length-(30000+length(SF10_Hoevers)))];
Ten_identical_simulated_Hoevers_fine_crackles       = SF1_Hoevers+SF2_Hoevers+SF3_Hoevers+SF4_Hoevers+SF5_Hoevers+SF6_Hoevers+SF7_Hoevers+SF8_Hoevers+SF9_Hoevers+SF10_Hoevers;
Ten_identical_simulated_Hoevers_fine_crackles       = Ten_identical_simulated_Hoevers_fine_crackles(1:end);
%% Plot
figure
plot(Ten_identical_simulated_Hoevers_fine_crackles,'k');
xlabel('Number of samples','FontSize',12,'FontName','Times New Roman','fontweight','bold');
ylabel('Amplitude','FontSize',12,'FontName','Times New Roman','fontweight','bold');
%%
text(1150,.75,'\downarrow','fontsize',12,'FontWeight','bold')
text(250,.85,'SF1-H','fontsize',8,'FontWeight','bold')
text(3150,.75,'\downarrow','fontsize',12,'FontWeight','bold')
text(3150,.85,'SF2-H','fontsize',8,'FontWeight','bold')
text(7150,.75,'\downarrow','fontsize',12,'FontWeight','bold')
text(7000,.85,'SF3-H','fontsize',8,'FontWeight','bold')
text(12150,.75,'\downarrow','fontsize',12,'FontWeight','bold')
text(11150,.85,'SF4-H','fontsize',8,'FontWeight','bold')
text(14150,.75,'\downarrow','fontsize',12,'FontWeight','bold')
text(14150,.85,'SF5-H','fontsize',8,'FontWeight','bold')
text(17150,.75,'\downarrow','fontsize',12,'FontWeight','bold')
text(17150,.85,'SF6-H','fontsize',8,'FontWeight','bold')
text(20150,.75,'\downarrow','fontsize',12,'FontWeight','bold')
text(20150,.85,'SF7-H','fontsize',8,'FontWeight','bold')
text(23150,.75,'\downarrow','fontsize',12,'FontWeight','bold')
text(23150,.85,'SF8-H','fontsize',8,'FontWeight','bold')
text(27650,.75,'\downarrow','fontsize',12,'FontWeight','bold')
text(26500,.85,'SF9-H','fontsize',8,'FontWeight','bold')
text(30150,.75,'\downarrow','fontsize',12,'FontWeight','bold')
text(29800,.85,'SF10-H','fontsize',8,'FontWeight','bold')
%%
set(gcf, 'Position',  [100, 300, 800, 300])
title('10 identical simulated Hoevers fine crackles','FontSize',12,'FontName','Times New Roman','fontweight','bold');
xlim([0 Signal_length]);
ylim([-1 1]);