
%% Matlab Code for generating Gaussian white noise in the range of -10 to 10 dB in steps of 1 dB and 201 test signals for each SNR
clc;
close all;
%% Load 10 real fine crackles here 
load RF1
load RF2
load RF3
load RF4
load RF5
load RF6
load RF7
load RF8
load RF9
load RF10
fs              = 44100;                                                      %% Sampling frequency
Signal_length   = 32768;                                                      %% Signal length
%% Make the length equal
RF1             = [zeros(1,1000),RF1,zeros(1,Signal_length-(1000+length(RF1)))];
RF2             = [zeros(1,3000),RF2,zeros(1,Signal_length-(3000+length(RF2)))];
RF3             = [zeros(1,7000),RF3,zeros(1,Signal_length-(7000+length(RF3)))];
RF4             = [zeros(1,12000),RF4,zeros(1,Signal_length-(12000+length(RF4)))];
RF5             = [zeros(1,14000),RF5,zeros(1,Signal_length-(14000+length(RF5)))];
RF6             = [zeros(1,17000),RF6,zeros(1,Signal_length-(17000+length(RF6)))];
RF7             = [zeros(1,20000),RF7,zeros(1,Signal_length-(20000+length(RF7)))];
RF8             = [zeros(1,23000),RF8,zeros(1,Signal_length-(23000+length(RF8)))];
RF9             = [zeros(1,27500),RF9,zeros(1,Signal_length-(27500+length(RF9)))];
RF10            = [zeros(1,30000),RF10,zeros(1,Signal_length-(30000+length(RF10)))];
Ten_real_fine_crackles      = RF1+RF2+RF3+RF4+RF5+RF6+RF7+RF8+RF9+RF10;
Ten_real_fine_crackles      = Ten_real_fine_crackles(1:end);
%% Preallocate variables here



%% Start SNR and Iterative loops
for SNR_loop        = -10:1:10                                              %% Start signal to noise ratio loop
for iterative_loop  = 1:201                                                 %% Start number of iterations loop 
%% Generate Gaussian white noise
Signal              = awgn(Ten_real_fine_crackles,SNR_loop,'measured');     %% Signal with 10 real fine crackles buried under Gaussian white noise
                                                                 

%% Use your separation technique here


end
end