├── Abode_Daniel_Practical_Report.pdf ├── CRLB.m ├── CRLB_vs_variance_plot.m ├── Calc_the_frequency.m ├── CalculatingFFT.m ├── Central_Limit_Theorem.m ├── Den.mat ├── Fe.mat ├── Impulse_response_of_Hz.m ├── Least_square_criterion.m ├── Least_square_criterion_plot_against_fo.m ├── Least_square_criterion_plot_against_fo_f1.m ├── Least_square_criterion_plot_against_var.m ├── Least_square_criterion_plot_against_var_with_f1_f0_constant.m ├── LinearEstimation.m ├── LinearEstimation_0.m ├── LinearEstimation_1.m ├── LinearEstimation_1_1.m ├── LinearEstimation_3.m ├── LinearEstimator_4_0.m ├── LinearEstimator_4_1.m ├── LinearEstimator_5_1.m ├── LinearEstimator_5_2.m ├── Matlab_NonLinearEstimation.m ├── Noise.m ├── Non_linear_Estimator.m ├── README.md ├── Roots_rt.m ├── Untitled.asv ├── a.wav ├── aeiou22.mat ├── all.mat ├── c_p.m ├── carac.mat ├── d_aeiou.m ├── dataOfa.m ├── demo.m ├── demo1.m ├── demo_1.m ├── e.wav ├── ecoute.m ├── essai.m ├── essai_tp.m ├── estimated value of m = .ps ├── formants.m ├── i.wav ├── iden.m ├── o.wav ├── p_dom.m ├── p_dom.mat ├── recon.m ├── synthe.m ├── synthe22.mat ├── test.m ├── tryef.m ├── tryingT.m ├── trying_synthesis.m ├── u.wav └── visu.m /Abode_Daniel_Practical_Report.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abodedaniel/Signal-Estimation-and-Processing/c9c089fbc848477f66c502cc6a89b245aafb18ae/Abode_Daniel_Practical_Report.pdf -------------------------------------------------------------------------------- /CRLB.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abodedaniel/Signal-Estimation-and-Processing/c9c089fbc848477f66c502cc6a89b245aafb18ae/CRLB.m -------------------------------------------------------------------------------- /CRLB_vs_variance_plot.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abodedaniel/Signal-Estimation-and-Processing/c9c089fbc848477f66c502cc6a89b245aafb18ae/CRLB_vs_variance_plot.m -------------------------------------------------------------------------------- /Calc_the_frequency.m: -------------------------------------------------------------------------------- 1 | clc 2 | %% calculating the frequency Fi 3 | Fi = (1/(2*pi))* Fe .* ang; 4 | disp('Frequencies = ') 5 | disp(Fi) -------------------------------------------------------------------------------- /CalculatingFFT.m: -------------------------------------------------------------------------------- 1 | clc 2 | %% calculating the fourier trasnform of the signal A and plotting it 3 | L = 3930; %length of the signal 4 | NFFT = 2^nextpow2(L); % Next power of 2 from length of y 5 | Y = fft(A,NFFT)/L; 6 | f = Fe/2*linspace(0,1,NFFT/2+1); 7 | 8 | % Plot single-sided amplitude spectrum. 9 | plot(f,2*abs(Y(1:NFFT/2+1))) 10 | title('Single-Sided Amplitude Spectrum of A') 11 | xlabel('Frequency (Hz)') 12 | ylabel('Magnitude of the FFT of A') -------------------------------------------------------------------------------- /Central_Limit_Theorem.m: -------------------------------------------------------------------------------- 1 | clc 2 | clear all 3 | close all 4 | %%Central Limit Theorem 5 | S = zeros(1,1000); %%declaring vector S 6 | for j = 1:1000 7 | N = 10; %%value of N 8 | a = -1; 9 | b = 1; 10 | ni = a+(b-a)*rand(1,N); %%generating ni for size N 11 | S(j) = sum(ni); %%summing ni and storing in S 12 | end 13 | subplot(3,1,1) 14 | hist(S); 15 | title('Approximate pdf of Sj for size N = 10'); 16 | ylabel('Frequency') 17 | xlabel('values of Sj') 18 | 19 | %% Repeated for N = 1000 20 | for j = 1:1000 21 | N = 1000; %%value of N 22 | a = -1; 23 | b = 1; 24 | ni = a+(b-a)*rand(1,N); %%generating ni for size N 25 | S(j) = sum(ni); %%summing ni and storing in S 26 | end 27 | subplot(3,1,2) 28 | hist(S); 29 | title('Approximate pdf of Sj for size N = 10000'); 30 | ylabel('Frequency') 31 | xlabel('values of Sj') 32 | 33 | %% Repeated for size N = 100000 34 | for j = 1:1000 35 | N = 100000; %%value of N 36 | a = -1; 37 | b = 1; 38 | ni = a+(b-a)*rand(1,N); %%generating ni for size N 39 | S(j) = sum(ni); %%summing ni and storing in S 40 | end 41 | subplot(3,1,3) 42 | hist(S); 43 | title('Approximate pdf of Sj for size N = 100000'); 44 | ylabel('Frequency') 45 | xlabel('values of Sj') 46 | -------------------------------------------------------------------------------- /Den.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abodedaniel/Signal-Estimation-and-Processing/c9c089fbc848477f66c502cc6a89b245aafb18ae/Den.mat -------------------------------------------------------------------------------- /Fe.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abodedaniel/Signal-Estimation-and-Processing/c9c089fbc848477f66c502cc6a89b245aafb18ae/Fe.mat -------------------------------------------------------------------------------- /Impulse_response_of_Hz.m: -------------------------------------------------------------------------------- 1 | %% plotting the frequency and impulse response of H(z) 2 | close all 3 | clc 4 | freqz(rt) 5 | title('Frequency response of H(z)'); 6 | figure 7 | impz(rt) -------------------------------------------------------------------------------- /Least_square_criterion.m: -------------------------------------------------------------------------------- 1 | clc 2 | clear all 3 | close all 4 | %% y (t) = a1 sin(2?f0t) + a2 sin(2?f1t) + n(t), t= 1,....,N 5 | a1 = 1; 6 | a2 = 1; 7 | f0 = 0.25; 8 | f1 = 0.4; 9 | standard_deviation = 1; 10 | m = 5; %%choose m = 5 11 | N = 10000; 12 | t = 1:1:N; 13 | n = standard_deviation .* randn(1,N); 14 | y = (a1.*sin(2*pi*f0.*t)) + (a2.*sin(2*pi*f1.*t)) + n; 15 | y = y'; 16 | J = (y - (a1.*sin(2*pi*f0.*t')) - (a2.*sin(2*pi*f1.*t'))); 17 | J = J.^2; 18 | J1 = sum(J); 19 | disp(J1); -------------------------------------------------------------------------------- /Least_square_criterion_plot_against_fo.m: -------------------------------------------------------------------------------- 1 | clc 2 | close all 3 | %% y (t) = a1 sin(2?f0t) + a2 sin(2?f1t) + n(t), t= 1,....,N 4 | %% plotting the Least square criterion as a function of fo with fixed variance 5 | a1 = 1; 6 | a2 = 1; 7 | i = 1; 8 | J1 = zeros(length(0:0.01:0.5),1); 9 | for f0 = 0:0.01:0.5 10 | J = (y - (a1.*sin(2*pi*f0.*t')) - (a2.*sin(2*pi*f1.*t'))).^2; 11 | J = sum(J); 12 | J1(i) = J; 13 | i = i+1; 14 | end 15 | plot(0:0.01:0.5,J1); 16 | title('Plot of J as a function of fo for a1 = 1 and a2 = 1') 17 | ylabel('magnitude of J') 18 | xlabel('values of fo') 19 | [f0_value,J_value] = ginput(1); %picking the minimum coordinates 20 | disp('minimum coordinate of J as picked by manually by ginput() is') 21 | disp(['value for f0 = ' num2str(f0_value)]) 22 | disp(['at J = ' num2str(J_value)]) -------------------------------------------------------------------------------- /Least_square_criterion_plot_against_fo_f1.m: -------------------------------------------------------------------------------- 1 | %% a1 and a2 must be set to one in Least_square_criterion.m 2 | %% a1=a2=1 and variance constant, this code plot J(fo,f1) vs fo, f1 in a 3D plot 3 | clc 4 | close all 5 | %% y (t) = a1 sin(2?f0t) + a2 sin(2?f1t) + n(t), t= 1,....,N 6 | i = 1; 7 | k = 1; 8 | J1 = zeros(length(0:0.01:0.5),length(0:0.01:0.5)); 9 | for f1 = 0:0.01:0.5 10 | for f0 = 0:0.01:0.5 11 | J = (y - (a1.*sin(2*pi*f0.*t')) - (a2.*sin(2*pi*f1.*t'))).^2; 12 | J1(i,k) = sum(J); 13 | k = k+1; 14 | end 15 | i = i+1; 16 | k=1; 17 | end 18 | surf(0:0.01:0.5,0:0.01:0.5,J1); 19 | title('Plot of J(fo,f1) vs fo, fi') 20 | xlabel('values of fo') 21 | ylabel('values of f1') 22 | zlabel('Amplitude of J(fo,f1)') 23 | %[f0_value,f1_value,J_value] = ginput(1) %picking the minimum coordinates 24 | %plot3(0:0.01:0.5,0:0.01:0.5,J1); -------------------------------------------------------------------------------- /Least_square_criterion_plot_against_var.m: -------------------------------------------------------------------------------- 1 | clc 2 | close all 3 | %% y (t) = a1 sin(2?f0t) + a2 sin(2?f1t) + n(t), t= 1,....,N 4 | %% plotting J vs variance with fixed fo 5 | f0 = 0.25; 6 | a1 = 1; 7 | a2 = 1; 8 | N = 10000; 9 | t = 1:1:N; 10 | i=1; 11 | var_ = zeros(length(0.1:0.1:1),1); 12 | J1 = zeros(length(0.1:0.1:1),1); 13 | for s_d = 0.1:0.1:1 14 | n1 = s_d .* n; 15 | y = (a1.*sin(2*pi*f0.*t)) + (a2.*sin(2*pi*f1.*t)) + n1; 16 | var_(i) = var(y); 17 | y = y'; 18 | J = (y - (a1.*sin(2*pi*f0.*t')) - (a2.*sin(2*pi*f1.*t'))).^2; 19 | J1(i) = sum(J); 20 | i = i + 1; 21 | end 22 | plot(var_,J1) 23 | title('Plot of J vs variance with fo and f1constant and a1 = a2 = 1') 24 | ylabel('Amplitude of J') 25 | xlabel('Value of variance') -------------------------------------------------------------------------------- /Least_square_criterion_plot_against_var_with_f1_f0_constant.m: -------------------------------------------------------------------------------- 1 | clc 2 | close all 3 | %% y (t) = a1 sin(2?f0t) + a2 sin(2?f1t) + n(t), t= 1,....,N 4 | f0 = 0.25; 5 | f1 = 0.4; 6 | m = 5; %%choose m = 5 7 | N = 10000; 8 | t = 1:1:N; 9 | i=1; 10 | var_ = zeros(length(1:0.2:10),1); 11 | J1 = zeros(length(1:0.2:10),1); 12 | for s_d = 1:0.2:10 13 | n1 = s_d .* n; 14 | y = (a1.*sin(2*pi*f0.*t)) + (a2.*sin(2*pi*f1.*t)) + n1; 15 | var_(i) = var(y); 16 | y = y'; 17 | J = (y - (a1.*sin(2*pi*f0.*t')) - (a2.*sin(2*pi*f1.*t'))).^2; 18 | J1(i) = sum(J); 19 | i = i + 1; 20 | end 21 | plot(var_,J1) -------------------------------------------------------------------------------- /LinearEstimation.m: -------------------------------------------------------------------------------- 1 | clc 2 | clear all 3 | close all 4 | %% y(t) = m + n(t) t= 1,....,N 5 | v1 = zeros(5,5); 6 | for j = 0:4 7 | for i = 1:5 8 | m = 5; %%choose m = 5 9 | N = 1000; 10 | var = 1+(j*10); %%value for variance 11 | v2 = 1+j; 12 | n = var * randn(1,N); 13 | y = m + n; 14 | y = y'; 15 | %plot(y) 16 | %% Creating a Maximum Likelihood Estimator 17 | est_m = (1/N)*sum(y); 18 | v1(v2,i) = est_m; 19 | end 20 | end -------------------------------------------------------------------------------- /LinearEstimation_0.m: -------------------------------------------------------------------------------- 1 | clear all 2 | close all 3 | clc 4 | %% y(t) = m + n(t), t = 1.....N 5 | m = 5; 6 | N= 1000; 7 | t = 1:1:N 8 | y = zeros(N,5); 9 | n = zeros(N,1); 10 | std_d = 1; 11 | i = 1; %%counter for filling y for different values of variance 12 | for std_d = 0.1:0.2:1 13 | n = std_d * randn(N,1); 14 | y(:,i) = m + n; 15 | subplot(5,1,i); 16 | stem(t(1:100),y(1:100,i)); 17 | title(['Plot of y for variance = ' num2str(var(y(:,i)))]) 18 | xlabel('time(1:100)') 19 | ylabel('Amplitude') 20 | i = i+1; 21 | end 22 | 23 | 24 | -------------------------------------------------------------------------------- /LinearEstimation_1.m: -------------------------------------------------------------------------------- 1 | clear all 2 | close all 3 | clc 4 | %% y(t) = m + n(t), t = 1.....N 5 | m = 5; 6 | y = []; 7 | n = []; 8 | est_m = []; 9 | std_d = 1; 10 | i = 1; %%counter for filling y for different values of variance 11 | for N = [10, 100, 1000, 10000, 100000] 12 | n = std_d * randn(N,1); 13 | y = m + n; 14 | est_m(i) = sum(y)/N; 15 | disp(['Estimated value for N = ' num2str(N) ' is ' num2str(est_m(i))]) 16 | i = i+1; 17 | end 18 | 19 | 20 | -------------------------------------------------------------------------------- /LinearEstimation_1_1.m: -------------------------------------------------------------------------------- 1 | clear all 2 | close all 3 | clc 4 | %% realization of the performance of the estimator for various value of variance 5 | %% y(t) = m + n(t), t = 1.....N 6 | m = 5; 7 | y = []; 8 | n = []; 9 | est_m = []; 10 | N = 1000; 11 | i = 1; %%counter for filling y for different values of variance 12 | for std_d = [2, 4, 6, 8, 10] 13 | n = std_d * randn(N,1); 14 | y = m + n; 15 | est_m(i) = sum(y)/N; 16 | disp(['Estimated value for variance = ' num2str(var(y)) ' is ' num2str(est_m(i))]) 17 | i = i+1; 18 | end 19 | 20 | 21 | -------------------------------------------------------------------------------- /LinearEstimation_3.m: -------------------------------------------------------------------------------- 1 | clc 2 | clear all 3 | close all 4 | %% Realizing the bias of the estimator for different values of N 5 | %% y(t) = m + n(t) t= 1,....,N 6 | est_m = zeros(1,1000); 7 | b = zeros(1,10); 8 | i = 1; 9 | for N = 10:10000:100000 10 | for mc = 1:1000 11 | m = 5; %%choose m = 5 12 | n = randn(1,N); 13 | y = m + n; 14 | y = y'; 15 | %plot(y) 16 | %% Creating a Maximum Likelihood Estimator 17 | est_m(mc) = (1/N)*sum(y); 18 | end 19 | exp_est_m = sum(est_m)/mc; 20 | %%calculating the bias 21 | b(i) = exp_est_m - m; 22 | b(i) = abs(b(i)); 23 | i = i+1; 24 | end 25 | plot(10:10000:100000,b); 26 | title('plot for the bias for different values of N') 27 | xlabel('values of N') 28 | ylabel('value of bias') -------------------------------------------------------------------------------- /LinearEstimator_4_0.m: -------------------------------------------------------------------------------- 1 | clc 2 | clear all 3 | close all 4 | %% y(t) = m + n(t) t= 1,....,N 5 | est_m = zeros(1,1000); 6 | b = zeros(1,100); 7 | i = 1; 8 | for N = 10 9 | for mc = 1:10 10 | m = 100; %%choose m = 5 11 | n = randn(1,N); 12 | y = m + n; 13 | y = y'; 14 | %plot(y) 15 | %% Creating a Maximum Likelihood Estimator 16 | est_m(mc) = (1/(N-1))*sum(y); 17 | end 18 | exp_est_m = sum(est_m)/mc; 19 | %%calculating the bias 20 | b(i) = exp_est_m - m; 21 | b(i) = abs(b(i)); 22 | i = i+1; 23 | end 24 | plot(10:1000:100000,b); -------------------------------------------------------------------------------- /LinearEstimator_4_1.m: -------------------------------------------------------------------------------- 1 | clc 2 | clear all 3 | close all 4 | %% y(t) = m + n(t) t= 1,....,N 5 | est_m = zeros(1,1000); 6 | b = zeros(1,100); 7 | i = 1; 8 | for N = 10:1000:100000 9 | for mc = 1:1000 10 | m = 5; %%choose m = 5 11 | n = randn(1,N); 12 | y = m + n; 13 | y = y'; 14 | %plot(y) 15 | %% Creating a Maximum Likelihood Estimator 16 | est_m(mc) = (1/(N-1))*sum(y); 17 | end 18 | exp_est_m = sum(est_m)/mc; 19 | %%calculating the bias 20 | b(i) = exp_est_m - m; 21 | b(i) = abs(b(i)); 22 | i = i+1; 23 | end 24 | plot(10:1000:100000,b); 25 | title('plot of bias vs N') 26 | xlabel('values of N') 27 | ylabel('bias') 28 | -------------------------------------------------------------------------------- /LinearEstimator_5_1.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abodedaniel/Signal-Estimation-and-Processing/c9c089fbc848477f66c502cc6a89b245aafb18ae/LinearEstimator_5_1.m -------------------------------------------------------------------------------- /LinearEstimator_5_2.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abodedaniel/Signal-Estimation-and-Processing/c9c089fbc848477f66c502cc6a89b245aafb18ae/LinearEstimator_5_2.m -------------------------------------------------------------------------------- /Matlab_NonLinearEstimation.m: -------------------------------------------------------------------------------- 1 | clear all 2 | clc 3 | close all 4 | % PART 2 5 | 6 | % Original Sine Wave Specifications 7 | a1=1; % amplitude of sine wave 1 8 | a2=1; % amplitude of sine wave 2 9 | f0=0.3; % hertz 10 | f1=0.2; % hertz 11 | t=1:1:10^3; 12 | 13 | % Sine Wave 1: 14 | s1 = a1*sin(2*pi*f0.*t'); 15 | 16 | % Sine Wave 2 17 | s2 = a2*sin(2*pi*f1.*t'); 18 | 19 | % Gaussian Process 20 | mean=0; 21 | sd=2; % standard deviation 22 | N=10^3; 23 | g = sd*randn(N,1); 24 | 25 | y = s1 + s2 + g; 26 | 27 | % Iteration Specifications 28 | a1_J=1; 29 | a2_J=0; 30 | f0_J=0:0.01:0.5; % variable f0 31 | f1_J=0; 32 | 33 | iter=length(f0_J); 34 | J=[]; 35 | s1_sim=[]; 36 | s2_sim=[]; 37 | 38 | for i=1:iter; 39 | % Sine Wave 1 Sim 40 | s1_sim = a1_J*sin(2*pi*f0_J(i).*t'); 41 | % Sine Wave 2 sim 42 | s2_sim = 0; % a2_J*sin(2*pi*f1_J.*t'); 43 | % Criterion 44 | J(i) = sum((y - s1_sim - s2_sim).^2); 45 | end 46 | 47 | plot(f0_J,J') -------------------------------------------------------------------------------- /Noise.m: -------------------------------------------------------------------------------- 1 | clc 2 | clear all 3 | close all 4 | %%Noises - Using rand to create a vector of random variables 5 | v = rand(1,10); %vector v of size 10 6 | figure 7 | subplot(2,1,1); %creating a subplot 8 | plot(v); %plot vector 9 | title('plot of vector v of size 10') 10 | ylabel('Amplitude') 11 | xlabel('Number of elements in vector v') 12 | subplot(2,1,2); 13 | hist(v); %use hist to plot approximate pdf 14 | title('Approximate pdf of vector v of size 10') 15 | ylabel('Frequency') 16 | xlabel('Elements in vector v') 17 | v_mean_1 = mean(v) %mean of vector v 18 | v_var_1 = var(v) %variance of vector v 19 | 20 | %repeating above vector v of size 10000 21 | v = rand(1,10000); 22 | figure 23 | subplot(2,1,1); 24 | plot(v); 25 | title('plot of vector v of size 10000') 26 | ylabel('Amplitude') 27 | xlabel('Number of elements in vector v') 28 | subplot(2,1,2); 29 | hist(v); %use hist to plot approximate pdf 30 | title('Approximate pdf of vector v of size 10000') 31 | ylabel('Frequency') 32 | xlabel('Elements in vector v') 33 | v_mean_2 = mean(v) %mean of vector v 34 | v_var_2 = var(v) %variance of vector v 35 | 36 | %% Using randn() to generate v for size 10 37 | v = randn(1,10); 38 | figure 39 | subplot(2,1,1) 40 | plot(v); 41 | title('plot of vector v of size 10') 42 | ylabel('Amplitude') 43 | xlabel('Number of elements in vector v') 44 | subplot(2,1,2) 45 | hist(v); 46 | title('Approximate pdf of vector v of size 10') 47 | ylabel('Frequency') 48 | xlabel('Elements in vector v') 49 | v_mean_1 = mean(v) %mean of vector v 50 | v_var_1 = var(v) %variance of vector v 51 | 52 | %% Repeating using randn() to generate v for size 10000 53 | v = randn(1,10000); 54 | figure 55 | subplot(2,1,1) 56 | plot(v); 57 | title('plot of vector v of size 10000') 58 | ylabel('Amplitude') 59 | xlabel('Number of elements in vector v') 60 | subplot(2,1,2) 61 | hist(v); 62 | title('Approximate pdf of vector v of size 10000') 63 | ylabel('Frequency') 64 | xlabel('Elements in vector v') 65 | v_mean_2 = mean(v) %mean of vector v 66 | v_var_2 = var(v) %variance of vector v 67 | 68 | -------------------------------------------------------------------------------- /Non_linear_Estimator.m: -------------------------------------------------------------------------------- 1 | clc 2 | clear all 3 | close all 4 | %% generating and ploting y(t) 5 | %% y (t) = a1 sin(2?f0t) + a2 sin(2?f1t) + n(t), t= 1,....,N 6 | a1 = 1; 7 | a2 = 1; 8 | f0 = 0.25; 9 | f1 = 0.4; 10 | i = 1; %counter 11 | for std_dev = [0.1, 0.5, 1]; %standard devviation 12 | m = 5; %%choose m = 5 13 | N = 1000; 14 | t = 1:1:N; 15 | n = std_dev .* randn(1,N); 16 | y = (a1.*sin(2*pi*f0.*t)) + (a2.*sin(2*pi*f1.*t)) + n; 17 | y = y'; 18 | hold on 19 | subplot(3,1,i) 20 | 21 | stem(y(1:1:100)); 22 | hold on 23 | plot(y(1:1:100), 'r-'); 24 | hold off 25 | title(['plot of y for variance = ' num2str(var(n))]) 26 | ylabel('Amplitude of Y') 27 | xlabel('time t') 28 | axis([1,100,-4,4]) 29 | i = i+1; 30 | end 31 | 32 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Signal-Estimation-and-Processing 2 | The purpose of the laboratory practical was to gain knowledge on the basics of MATLAB and its application to Statistical Signal Processing. The experiment was divided into two parts; the first part was on basics of MATLAB and its application to signal processing problems, the second part was on Speech processing using MATLAB. In the first chapter, after getting acquainted with basic matlab programming concepts, we proceeded to generating noise using the rand() and randn() functions. The concept of linear estimation was modelled to estimate the message in a signal corrupted by noise and the designed estimators were compared and justified to satisfy the Cramer-Rao Lower Bound theorem. In addition, a non linear estimation techniques; Least-Square criterion was developed to estimate the variables in a sum of sinusoidal signal corrupted by noise. The second chapter covered parameter estimation of an AR process. A sound signal was analyzed and a sample of the sound signal was synthesized and compared with the recorded sound signal. 3 | 4 | 5 | 6 | To get a good understanding of the codes, you need to check out the practical report added as a pdf file 7 | -------------------------------------------------------------------------------- /Roots_rt.m: -------------------------------------------------------------------------------- 1 | clc 2 | %% calculating the roots of the polynomial 3 | rt = roots(Den); 4 | plot(real(rt), imag(rt), '*') 5 | title('Plot of roots in complex plane'); 6 | ylabel('Imaginary'); 7 | xlabel('Real'); 8 | 9 | %% calculating the modulus and phases of rt 10 | modulus = abs(rt); 11 | ang = angle(rt); -------------------------------------------------------------------------------- /Untitled.asv: -------------------------------------------------------------------------------- 1 | close all 2 | subplot(2,1,1) 3 | plot(a) 4 | title('plot of the data of "a"') 5 | ylabel('Amplitude') 6 | xlabel('time') 7 | A = a(1:3) -------------------------------------------------------------------------------- /a.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abodedaniel/Signal-Estimation-and-Processing/c9c089fbc848477f66c502cc6a89b245aafb18ae/a.wav -------------------------------------------------------------------------------- /aeiou22.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abodedaniel/Signal-Estimation-and-Processing/c9c089fbc848477f66c502cc6a89b245aafb18ae/aeiou22.mat -------------------------------------------------------------------------------- /all.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abodedaniel/Signal-Estimation-and-Processing/c9c089fbc848477f66c502cc6a89b245aafb18ae/all.mat -------------------------------------------------------------------------------- /c_p.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abodedaniel/Signal-Estimation-and-Processing/c9c089fbc848477f66c502cc6a89b245aafb18ae/c_p.m -------------------------------------------------------------------------------- /carac.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abodedaniel/Signal-Estimation-and-Processing/c9c089fbc848477f66c502cc6a89b245aafb18ae/carac.mat -------------------------------------------------------------------------------- /d_aeiou.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abodedaniel/Signal-Estimation-and-Processing/c9c089fbc848477f66c502cc6a89b245aafb18ae/d_aeiou.m -------------------------------------------------------------------------------- /dataOfa.m: -------------------------------------------------------------------------------- 1 | %% plotting a and selecting the useful part into variable A 2 | close all 3 | subplot(2,1,1) 4 | plot(a) 5 | title('plot of the data of "a"') 6 | ylabel('Amplitude') 7 | xlabel('time') 8 | A = a(1:3930); %%the useful part of a 9 | subplot(2,1,2) 10 | plot(A) 11 | title('plot of A (useful part of "a") ') 12 | ylabel('Amplitude') 13 | xlabel('time') -------------------------------------------------------------------------------- /demo.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abodedaniel/Signal-Estimation-and-Processing/c9c089fbc848477f66c502cc6a89b245aafb18ae/demo.m -------------------------------------------------------------------------------- /demo1.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abodedaniel/Signal-Estimation-and-Processing/c9c089fbc848477f66c502cc6a89b245aafb18ae/demo1.m -------------------------------------------------------------------------------- /demo_1.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abodedaniel/Signal-Estimation-and-Processing/c9c089fbc848477f66c502cc6a89b245aafb18ae/demo_1.m -------------------------------------------------------------------------------- /e.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abodedaniel/Signal-Estimation-and-Processing/c9c089fbc848477f66c502cc6a89b245aafb18ae/e.wav -------------------------------------------------------------------------------- /ecoute.m: -------------------------------------------------------------------------------- 1 | function ecoute 2 | 3 | load synthe22 4 | z=zeros(1,10000); 5 | a=a/max(abs(a)); e=e/max(abs(e)); i=i/max(abs(i)); o=o/max(abs(o)); u=u/max(abs(u)); 6 | s=[a z e z i z o z u z]; 7 | a_synthe=a_synthe/max(abs(a_synthe)); e_synthe=e_synthe/max(abs(e_synthe)); 8 | i_synthe=i_synthe/max(abs(i_synthe)); o_synthe=o_synthe/max(abs(o_synthe)); 9 | u_synthe=u_synthe/max(abs(u_synthe)); 10 | s_synthe=[a_synthe z e_synthe z i_synthe z o_synthe z u_synthe z]; 11 | sound([s s_synthe],Fe); 12 | -------------------------------------------------------------------------------- /essai.m: -------------------------------------------------------------------------------- 1 | E_a=(sa*sa')/length(sa); 2 | E_e=(se*se')/length(se); 3 | E_i=(si*si')/length(si); 4 | E_o=(so*so')/length(so); 5 | E_u=(su*su')/length(su); 6 | E=(s*s')/length(s); 7 | [k,ca]=c_p(sa,s,1024);ca=max(ca)/E_a/E_s; 8 | [k,ce]=c_p(se,s,1024);ce=max(ce)/E_e/E_s; 9 | [k,ci]=c_p(si,s,1024);ci=max(ci)/E_i/E_s; 10 | [k,co]=c_p(so,s,1024);co=max(co)/E_o/E_s; 11 | [k,cu]=c_p(su,s,1024);cu=max(cu)/E_u/E_s; -------------------------------------------------------------------------------- /essai_tp.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abodedaniel/Signal-Estimation-and-Processing/c9c089fbc848477f66c502cc6a89b245aafb18ae/essai_tp.m -------------------------------------------------------------------------------- /estimated value of m = .ps: -------------------------------------------------------------------------------- 1 | %!PS-Adobe-2.0 2 | %%Creator: MATLAB, The MathWorks, Inc. Version 8.3.0.532 (R2014a). Operating System: Microsoft Windows 10 Pro. 3 | %%Title: .\estimated value of m = .ps 4 | %%CreationDate: 05/14/2020 17:10:12 5 | %%DocumentNeededFonts: Helvetica 6 | %%DocumentProcessColors: Cyan Magenta Yellow Black 7 | %%Pages: (atend) 8 | %%BoundingBox: (atend) 9 | %%EndComments 10 | 11 | %%BeginProlog 12 | % MathWorks dictionary 13 | /MathWorks 160 dict begin 14 | % definition operators 15 | /bdef {bind def} bind def 16 | /ldef {load def} bind def 17 | /xdef {exch def} bdef 18 | /xstore {exch store} bdef 19 | % operator abbreviations 20 | /c /clip ldef 21 | /cc /concat ldef 22 | /cp /closepath ldef 23 | /gr /grestore ldef 24 | /gs /gsave ldef 25 | /mt /moveto ldef 26 | /np /newpath ldef 27 | /cm /currentmatrix ldef 28 | /sm /setmatrix ldef 29 | /rm /rmoveto ldef 30 | /rl /rlineto ldef 31 | /s {show newpath} bdef 32 | /sc {setcmykcolor} bdef 33 | /sr /setrgbcolor ldef 34 | /sg /setgray ldef 35 | /w /setlinewidth ldef 36 | /j /setlinejoin ldef 37 | /cap /setlinecap ldef 38 | /rc {rectclip} bdef 39 | /rf {rectfill} bdef 40 | % page state control 41 | /pgsv () def 42 | /bpage {/pgsv save def} bdef 43 | /epage {pgsv restore} bdef 44 | /bplot /gsave ldef 45 | /eplot {stroke grestore} bdef 46 | % orientation switch 47 | /portraitMode 0 def /landscapeMode 1 def /rotateMode 2 def 48 | % coordinate system mappings 49 | /dpi2point 0 def 50 | % font control 51 | /FontSize 0 def 52 | /FMS {/FontSize xstore findfont [FontSize 0 0 FontSize neg 0 0] 53 | makefont setfont} bdef 54 | /ISOLatin1Encoding where {pop /WindowsLatin1Encoding 256 array bdef 55 | ISOLatin1Encoding WindowsLatin1Encoding copy pop 56 | /.notdef/.notdef/quotesinglbase/florin/quotedblbase/ellipsis/dagger 57 | /daggerdbl/circumflex/perthousand/Scaron/guilsinglleft/OE/.notdef/.notdef 58 | /.notdef/.notdef/quoteleft/quoteright/quotedblleft/quotedblright/bullet 59 | /endash/emdash/tilde/trademark/scaron/guilsinglright/oe/.notdef/.notdef 60 | /Ydieresis WindowsLatin1Encoding 128 32 getinterval astore pop} 61 | {/WindowsLatin1Encoding StandardEncoding bdef} ifelse 62 | /reencode {exch dup where {pop load} {pop StandardEncoding} ifelse 63 | exch dup 3 1 roll findfont dup length dict begin 64 | { 1 index /FID ne {def}{pop pop} ifelse } forall 65 | /Encoding exch def currentdict end definefont pop} bdef 66 | /isroman {findfont /CharStrings get /Agrave known} bdef 67 | /FMSR {3 1 roll 1 index dup isroman {reencode} {pop pop} ifelse 68 | exch FMS} bdef 69 | /csm {1 dpi2point div -1 dpi2point div scale neg translate 70 | dup landscapeMode eq {pop -90 rotate} 71 | {rotateMode eq {90 rotate} if} ifelse} bdef 72 | % line types: solid, dotted, dashed, dotdash 73 | /SO { [] 0 setdash } bdef 74 | /DO { [.5 dpi2point mul 4 dpi2point mul] 0 setdash } bdef 75 | /DA { [6 dpi2point mul] 0 setdash } bdef 76 | /DD { [.5 dpi2point mul 4 dpi2point mul 6 dpi2point mul 4 77 | dpi2point mul] 0 setdash } bdef 78 | % macros for lines and objects 79 | /L {lineto stroke} bdef 80 | /MP {3 1 roll moveto 1 sub {rlineto} repeat} bdef 81 | /AP {{rlineto} repeat} bdef 82 | /PDlw -1 def 83 | /W {/PDlw currentlinewidth def setlinewidth} def 84 | /PP {closepath eofill} bdef 85 | /DP {closepath stroke} bdef 86 | /MR {4 -2 roll moveto dup 0 exch rlineto exch 0 rlineto 87 | neg 0 exch rlineto closepath} bdef 88 | /FR {MR stroke} bdef 89 | /PR {MR fill} bdef 90 | /L1i {{currentfile picstr readhexstring pop} image} bdef 91 | /tMatrix matrix def 92 | /MakeOval {newpath tMatrix currentmatrix pop translate scale 93 | 0 0 1 0 360 arc tMatrix setmatrix} bdef 94 | /FO {MakeOval stroke} bdef 95 | /PO {MakeOval fill} bdef 96 | /PD {currentlinewidth 2 div 0 360 arc fill 97 | PDlw -1 eq not {PDlw w /PDlw -1 def} if} def 98 | /FA {newpath tMatrix currentmatrix pop translate scale 99 | 0 0 1 5 -2 roll arc tMatrix setmatrix stroke} bdef 100 | /PA {newpath tMatrix currentmatrix pop translate 0 0 moveto scale 101 | 0 0 1 5 -2 roll arc closepath tMatrix setmatrix fill} bdef 102 | /FAn {newpath tMatrix currentmatrix pop translate scale 103 | 0 0 1 5 -2 roll arcn tMatrix setmatrix stroke} bdef 104 | /PAn {newpath tMatrix currentmatrix pop translate 0 0 moveto scale 105 | 0 0 1 5 -2 roll arcn closepath tMatrix setmatrix fill} bdef 106 | /vradius 0 def /hradius 0 def /lry 0 def 107 | /lrx 0 def /uly 0 def /ulx 0 def /rad 0 def 108 | /MRR {/vradius xdef /hradius xdef /lry xdef /lrx xdef /uly xdef 109 | /ulx xdef newpath tMatrix currentmatrix pop ulx hradius add uly 110 | vradius add translate hradius vradius scale 0 0 1 180 270 arc 111 | tMatrix setmatrix lrx hradius sub uly vradius add translate 112 | hradius vradius scale 0 0 1 270 360 arc tMatrix setmatrix 113 | lrx hradius sub lry vradius sub translate hradius vradius scale 114 | 0 0 1 0 90 arc tMatrix setmatrix ulx hradius add lry vradius sub 115 | translate hradius vradius scale 0 0 1 90 180 arc tMatrix setmatrix 116 | closepath} bdef 117 | /FRR {MRR stroke } bdef 118 | /PRR {MRR fill } bdef 119 | /MlrRR {/lry xdef /lrx xdef /uly xdef /ulx xdef /rad lry uly sub 2 div def 120 | newpath tMatrix currentmatrix pop ulx rad add uly rad add translate 121 | rad rad scale 0 0 1 90 270 arc tMatrix setmatrix lrx rad sub lry rad 122 | sub translate rad rad scale 0 0 1 270 90 arc tMatrix setmatrix 123 | closepath} bdef 124 | /FlrRR {MlrRR stroke } bdef 125 | /PlrRR {MlrRR fill } bdef 126 | /MtbRR {/lry xdef /lrx xdef /uly xdef /ulx xdef /rad lrx ulx sub 2 div def 127 | newpath tMatrix currentmatrix pop ulx rad add uly rad add translate 128 | rad rad scale 0 0 1 180 360 arc tMatrix setmatrix lrx rad sub lry rad 129 | sub translate rad rad scale 0 0 1 0 180 arc tMatrix setmatrix 130 | closepath} bdef 131 | /FtbRR {MtbRR stroke } bdef 132 | /PtbRR {MtbRR fill } bdef 133 | /stri 6 array def /dtri 6 array def 134 | /smat 6 array def /dmat 6 array def 135 | /tmat1 6 array def /tmat2 6 array def /dif 3 array def 136 | /asub {/ind2 exch def /ind1 exch def dup dup 137 | ind1 get exch ind2 get sub exch } bdef 138 | /tri_to_matrix { 139 | 2 0 asub 3 1 asub 4 0 asub 5 1 asub 140 | dup 0 get exch 1 get 7 -1 roll astore } bdef 141 | /compute_transform { 142 | dmat dtri tri_to_matrix tmat1 invertmatrix 143 | smat stri tri_to_matrix tmat2 concatmatrix } bdef 144 | /ds {stri astore pop} bdef 145 | /dt {dtri astore pop} bdef 146 | /db {2 copy /cols xdef /rows xdef mul dup string 147 | currentfile exch readhexstring pop 148 | /bmap xdef pop pop} bdef 149 | /it {gs np dtri aload pop moveto lineto lineto cp c 150 | cols rows 8 compute_transform 151 | {bmap} image gr}bdef 152 | /il {newpath moveto lineto stroke}bdef 153 | currentdict end def 154 | %%EndProlog 155 | 156 | %%BeginSetup 157 | MathWorks begin 158 | 159 | 0 cap 160 | 161 | end 162 | %%EndSetup 163 | 164 | %%Page: 1 1 165 | %%BeginPageSetup 166 | %%PageBoundingBox: 83 215 553 589 167 | MathWorks begin 168 | bpage 169 | %%EndPageSetup 170 | 171 | %%BeginObject: obj1 172 | bplot 173 | 174 | /dpi2point 12 def 175 | portraitMode 0204 7344 csm 176 | 177 | 798 274 5639 4486 MR c np 178 | 85 dict begin %Colortable dictionary 179 | /c0 { 0.000000 0.000000 0.000000 sr} bdef 180 | /c1 { 1.000000 1.000000 1.000000 sr} bdef 181 | /c2 { 0.900000 0.000000 0.000000 sr} bdef 182 | /c3 { 0.000000 0.820000 0.000000 sr} bdef 183 | /c4 { 0.000000 0.000000 0.800000 sr} bdef 184 | /c5 { 0.910000 0.820000 0.320000 sr} bdef 185 | /c6 { 1.000000 0.260000 0.820000 sr} bdef 186 | /c7 { 0.000000 0.820000 0.820000 sr} bdef 187 | c0 188 | 1 j 189 | 1 sg 190 | 0 0 6913 5185 PR 191 | 6 w 192 | 0 4225 5356 0 0 -4225 899 4614 4 MP 193 | PP 194 | -5356 0 0 4225 5356 0 0 -4225 899 4614 5 MP stroke 195 | 4 w 196 | DO 197 | SO 198 | 6 w 199 | 0 sg 200 | 899 389 mt 6255 389 L 201 | 899 4614 mt 6255 4614 L 202 | 6255 4614 mt 6255 389 L 203 | 899 4614 mt 899 389 L 204 | 899 4614 mt 6255 4614 L 205 | 899 4614 mt 899 389 L 206 | 899 4614 mt 899 4560 L 207 | 899 389 mt 899 442 L 208 | %%IncludeResource: font Helvetica 209 | /Helvetica /WindowsLatin1Encoding 120 FMSR 210 | 211 | 866 4759 mt 212 | (0) s 213 | 1434 4614 mt 1434 4560 L 214 | 1434 389 mt 1434 442 L 215 | 1334 4759 mt 216 | (100) s 217 | 1970 4614 mt 1970 4560 L 218 | 1970 389 mt 1970 442 L 219 | 1870 4759 mt 220 | (200) s 221 | 2505 4614 mt 2505 4560 L 222 | 2505 389 mt 2505 442 L 223 | 2405 4759 mt 224 | (300) s 225 | 3041 4614 mt 3041 4560 L 226 | 3041 389 mt 3041 442 L 227 | 2941 4759 mt 228 | (400) s 229 | 3577 4614 mt 3577 4560 L 230 | 3577 389 mt 3577 442 L 231 | 3477 4759 mt 232 | (500) s 233 | 4112 4614 mt 4112 4560 L 234 | 4112 389 mt 4112 442 L 235 | 4012 4759 mt 236 | (600) s 237 | 4648 4614 mt 4648 4560 L 238 | 4648 389 mt 4648 442 L 239 | 4548 4759 mt 240 | (700) s 241 | 5183 4614 mt 5183 4560 L 242 | 5183 389 mt 5183 442 L 243 | 5083 4759 mt 244 | (800) s 245 | 5719 4614 mt 5719 4560 L 246 | 5719 389 mt 5719 442 L 247 | 5619 4759 mt 248 | (900) s 249 | 6255 4614 mt 6255 4560 L 250 | 6255 389 mt 6255 442 L 251 | 6122 4759 mt 252 | (1000) s 253 | 899 4614 mt 952 4614 L 254 | 6255 4614 mt 6201 4614 L 255 | 798 4658 mt 256 | (1) s 257 | 899 4085 mt 952 4085 L 258 | 6255 4085 mt 6201 4085 L 259 | 798 4129 mt 260 | (2) s 261 | 899 3557 mt 952 3557 L 262 | 6255 3557 mt 6201 3557 L 263 | 798 3601 mt 264 | (3) s 265 | 899 3029 mt 952 3029 L 266 | 6255 3029 mt 6201 3029 L 267 | 798 3073 mt 268 | (4) s 269 | 899 2501 mt 952 2501 L 270 | 6255 2501 mt 6201 2501 L 271 | 798 2545 mt 272 | (5) s 273 | 899 1973 mt 952 1973 L 274 | 6255 1973 mt 6201 1973 L 275 | 798 2017 mt 276 | (6) s 277 | 899 1445 mt 952 1445 L 278 | 6255 1445 mt 6201 1445 L 279 | 798 1489 mt 280 | (7) s 281 | 899 917 mt 952 917 L 282 | 6255 917 mt 6201 917 L 283 | 798 961 mt 284 | (8) s 285 | 899 389 mt 952 389 L 286 | 6255 389 mt 6201 389 L 287 | 798 433 mt 288 | (9) s 289 | 899 389 mt 6255 389 L 290 | 899 4614 mt 6255 4614 L 291 | 6255 4614 mt 6255 389 L 292 | 899 4614 mt 899 389 L 293 | gs 899 389 5357 4226 MR c np 294 | 6 -751 5 -44 6 -241 5 628 5 361 6 -880 5 214 5 535 295 | 6 -40 5 -297 5 611 6 -352 5 -374 5 926 6 -142 5 -857 296 | 6 980 5 -830 5 -1284 6 2167 5 -815 5 480 6 113 5 36 297 | 5 -1042 6 -133 5 99 5 642 6 13 5 299 6 27 5 -302 298 | 5 -1052 6 1414 5 -108 5 -8 6 320 5 -582 5 -303 6 -369 299 | 5 210 5 312 6 518 5 -93 6 -9 5 -710 5 707 6 419 300 | 5 -921 5 -492 6 1254 5 -639 5 -573 6 818 5 -1365 5 1296 301 | 6 -183 5 -283 6 1011 5 -923 5 378 6 -978 5 1007 5 142 302 | 6 -420 5 540 5 -322 6 -295 5 189 5 -359 6 -713 5 1327 303 | 5 -403 6 103 5 993 6 -1418 5 770 5 245 6 -1556 5 991 304 | 5 520 6 -960 5 302 5 -70 6 43 5 157 5 -900 6 1583 305 | 5 -136 6 -370 5 -1094 5 1252 6 -813 5 651 5 -389 6 749 306 | 5 -339 5 -913 6 825 5724 2350 100 MP stroke 307 | 5 -1045 5 1150 6 231 5 -1100 6 806 5 -483 5 -96 6 790 308 | 5 -183 5 -468 6 -60 5 543 5 218 6 -1303 5 240 5 359 309 | 6 447 5 241 6 -449 5 241 5 -696 6 789 5 -1207 5 1283 310 | 6 -454 5 1212 5 -1720 6 470 5 143 5 667 6 184 5 -614 311 | 5 -213 6 -546 5 600 6 -575 5 770 5 -1438 6 907 5 888 312 | 5 -952 6 585 5 -20 5 -138 6 -49 5 -135 5 -392 6 604 313 | 5 -596 6 273 5 -274 5 425 6 650 5 -415 5 -1085 6 757 314 | 5 290 5 484 6 -414 5 -625 5 -35 6 250 5 466 6 65 315 | 5 -555 5 278 6 144 5 -432 5 793 6 -606 5 372 5 -1215 316 | 6 2285 5 -1230 5 989 6 -1230 5 -397 6 695 5 -358 5 -1139 317 | 6 954 5 680 5 729 6 -1061 5 -816 5 963 6 -179 5 -178 318 | 5 547 6 -432 5 -363 5 1136 6 -1026 5 1006 6 -1578 5 1088 319 | 5 77 6 -607 5 560 5194 2208 100 MP stroke 320 | 5 -462 6 888 5 -643 5 -201 6 11 5 920 5 -605 6 59 321 | 5 -777 6 -42 5 815 5 -516 6 545 5 579 5 -1675 6 1745 322 | 5 419 5 -1582 6 943 5 -645 5 -333 6 580 5 -625 6 233 323 | 5 -294 5 1018 6 -806 5 1481 5 -1599 6 90 5 -547 5 1673 324 | 6 -357 5 -51 5 -308 6 259 5 -851 6 475 5 -47 5 37 325 | 6 -258 5 -317 5 472 6 -266 5 26 5 642 6 -385 5 518 326 | 5 -712 6 27 5 947 5 -997 6 926 5 -229 6 -501 5 -125 327 | 5 -770 6 955 5 -777 5 1283 6 -407 5 -33 5 -404 6 241 328 | 5 -640 5 -398 6 916 5 860 6 -1375 5 794 5 -449 6 1112 329 | 5 -121 5 -814 6 -19 5 592 5 -379 6 292 5 -1139 5 524 330 | 6 884 5 -647 6 -513 5 1032 5 91 6 276 5 -108 5 -1003 331 | 6 61 5 269 5 722 6 -1814 5 1457 5 -183 6 -475 5 -128 332 | 6 652 5 513 5 -472 4664 2178 100 MP stroke 333 | 6 266 5 459 5 -1206 6 -1163 5 1086 5 17 6 111 5 661 334 | 5 41 6 210 5 -561 6 -507 5 1122 5 -831 6 -100 5 -676 335 | 5 1242 6 -400 5 988 5 -896 6 201 5 143 5 558 6 -219 336 | 5 -1105 5 -204 6 1063 5 -2288 6 1259 5 645 5 -814 6 406 337 | 5 582 5 192 6 -1107 5 566 5 903 6 -831 5 152 5 -198 338 | 6 268 5 -113 6 -905 5 291 5 148 6 -40 5 52 5 465 339 | 6 -82 5 -516 5 712 6 71 5 -871 5 998 6 -1012 5 720 340 | 6 -594 5 670 5 -1638 6 1049 5 -347 5 461 6 473 5 -1032 341 | 5 530 6 -599 5 -135 5 1910 6 -488 5 -27 6 -177 5 444 342 | 5 -675 6 -924 5 -273 5 1810 6 -1434 5 -173 5 827 6 936 343 | 5 -677 5 40 6 -5 5 -294 5 308 6 -113 5 -17 6 -74 344 | 5 295 5 516 6 -768 5 623 5 181 6 -1805 5 1101 5 -186 345 | 6 65 5 -356 5 874 4134 1923 100 MP stroke 346 | 6 -494 5 -180 6 53 5 -1 5 91 6 319 5 -479 5 293 347 | 6 -304 5 1226 5 203 6 -1288 5 -139 5 240 6 -979 5 1862 348 | 6 -792 5 -1129 5 1080 6 -115 5 -681 5 -164 6 1258 5 -1035 349 | 5 136 6 1694 5 -621 5 -807 6 284 5 -682 6 512 5 -380 350 | 5 -61 6 1085 5 122 5 -98 6 -1102 5 1957 5 -1609 6 645 351 | 5 191 5 -626 6 2007 5 -1658 5 -40 6 -466 5 -273 6 491 352 | 5 90 5 -81 6 -424 5 625 5 -941 6 876 5 -84 5 212 353 | 6 -178 5 781 5 -1106 6 429 5 -197 6 632 5 -39 5 -1518 354 | 6 295 5 385 5 579 6 -289 5 708 5 -1372 6 1327 5 -1438 355 | 5 1419 6 -709 5 -132 6 669 5 -775 5 97 6 -237 5 243 356 | 5 414 6 -90 5 -377 5 -989 6 1118 5 -246 5 913 6 -405 357 | 5 -92 6 -144 5 270 5 44 6 -1130 5 635 5 -567 6 449 358 | 5 -101 5 722 6 -791 3603 2897 100 MP stroke 359 | 5 152 5 157 6 -69 5 298 5 -738 6 716 5 685 6 -1240 360 | 5 320 5 447 6 -407 5 742 5 -808 6 -383 5 1151 5 -100 361 | 6 -101 5 -1448 5 1689 6 320 5 -418 6 -8 5 -670 5 220 362 | 6 -196 5 838 5 -330 6 631 5 -1976 5 1015 6 227 5 403 363 | 5 -704 6 863 5 -1250 6 877 5 -1076 5 1041 6 -557 5 212 364 | 5 -839 6 -619 5 1172 5 1330 6 -804 5 -338 5 -207 6 693 365 | 5 -1183 6 795 5 973 5 -1057 6 -360 5 1039 5 -158 6 -637 366 | 5 -844 5 1411 6 -1297 5 425 5 -241 6 952 5 478 6 -344 367 | 5 -675 5 -698 6 1043 5 1516 5 -1118 6 559 5 -557 5 -1712 368 | 6 1346 5 630 5 -702 6 32 5 -1517 5 918 6 1003 5 251 369 | 6 -978 5 764 5 -455 6 -516 5 730 5 313 6 -1072 5 914 370 | 5 303 6 -503 5 46 5 -278 6 252 5 -68 6 275 5 -368 371 | 5 -255 6 148 5 -207 3073 2668 100 MP stroke 372 | 5 202 6 -83 5 1268 5 -1088 6 688 5 -598 5 383 6 -1446 373 | 5 886 6 674 5 -1216 5 -180 6 590 5 -114 5 -580 6 455 374 | 5 -702 5 1331 6 -200 5 109 5 -1075 6 856 5 432 6 -440 375 | 5 880 5 -1261 6 928 5 -533 5 -525 6 481 5 9 5 1461 376 | 6 -1903 5 -508 5 1004 6 168 5 -383 5 249 6 -671 5 872 377 | 6 -216 5 450 5 -43 6 32 5 -1368 5 829 6 146 5 -690 378 | 5 490 6 1048 5 -1677 5 1461 6 373 5 -1035 6 -15 5 -220 379 | 5 -246 6 535 5 -1019 5 574 6 -35 5 411 5 -61 6 -108 380 | 5 5 5 160 6 -458 5 1220 6 -975 5 -426 5 107 6 143 381 | 5 95 5 474 6 -1231 5 200 5 388 6 344 5 99 5 72 382 | 6 620 5 -1223 6 1335 5 -348 5 -997 6 1367 5 -730 5 759 383 | 6 -622 5 -397 5 427 6 -1031 5 366 5 944 6 -472 5 609 384 | 5 -924 6 212 5 886 2543 1634 100 MP stroke 385 | 6 -1570 5 1320 5 -509 6 -307 5 60 5 -241 6 584 5 -150 386 | 5 -723 6 368 5 233 5 -410 6 1520 5 -1710 6 410 5 438 387 | 5 -450 6 151 5 202 5 241 6 128 5 -788 5 1459 6 -571 388 | 5 -1059 5 1166 6 -158 5 -1352 6 606 5 749 5 -882 6 17 389 | 5 722 5 -642 6 454 5 256 5 -1530 6 1073 5 -149 5 298 390 | 6 671 5 327 6 -1402 5 -142 5 980 6 -133 5 -686 5 407 391 | 6 -128 5 -376 5 -53 6 657 5 -729 5 326 6 456 5 -302 392 | 5 -126 6 729 5 -364 6 -143 5 -546 5 1300 6 -1082 5 60 393 | 5 -212 6 645 5 -1085 5 1142 6 -179 5 -291 5 585 6 -620 394 | 5 -256 6 688 5 -483 5 -765 6 464 5 -204 5 1399 6 136 395 | 5 -267 5 -771 6 332 5 1059 5 -1048 6 -626 5 951 6 -705 396 | 5 294 5 570 6 -240 5 -51 5 557 6 -1622 5 518 5 -635 397 | 6 1434 5 -188 5 -1488 2013 3641 100 MP stroke 398 | 6 886 5 372 6 701 5 -1006 5 -215 6 233 5 -306 5 438 399 | 6 -984 5 1063 5 -223 6 302 5 -1468 5 1640 6 -79 5 -509 400 | 6 136 5 208 5 -314 6 -467 5 1465 5 -931 6 -345 5 1056 401 | 5 -1052 6 -60 5 424 5 218 6 -49 5 159 5 89 6 13 402 | 5 -620 6 989 5 -1470 5 273 6 307 5 85 5 477 6 -315 403 | 5 1079 5 -1086 6 -29 5 -622 5 1089 6 -872 5 462 6 977 404 | 5 -1869 5 771 6 -85 5 609 5 -77 6 -696 5 -443 5 1745 405 | 6 -866 5 725 5 161 6 -678 5 -53 6 -795 5 1138 5 -551 406 | 6 -99 5 369 5 194 6 -804 5 684 5 498 6 -1373 5 -401 407 | 5 1285 6 64 5 -173 6 197 5 -825 5 -140 6 477 5 302 408 | 5 -62 6 -261 5 86 5 482 6 -503 5 -599 5 1139 6 -1450 409 | 5 695 5 -208 6 415 5 -1069 6 821 5 171 5 173 6 728 410 | 5 -586 5 78 6 278 1482 1903 100 MP stroke 411 | 5 -32 5 -916 6 -413 5 106 5 -135 6 1306 5 -705 6 867 412 | 5 -684 5 -637 6 386 5 -18 5 111 6 161 5 65 5 -343 413 | 6 359 5 346 5 -335 6 432 5 -906 6 740 5 -319 5 104 414 | 6 877 5 -525 5 -1523 6 1188 5 113 5 -65 6 664 5 -366 415 | 5 64 6 -1116 5 -383 6 1237 5 -394 5 599 6 -858 5 239 416 | 5 -176 6 573 5 437 5 -596 6 -246 5 92 5 367 6 -407 417 | 5 -410 5 792 6 1 5 60 6 -1373 5 2107 5 -1254 6 373 418 | 5 501 5 -1969 6 1866 5 -584 5 -109 6 -56 5 509 5 -293 419 | 6 -349 5 488 6 147 5 -240 5 -149 6 385 5 -118 5 2 420 | 6 -749 5 275 5 456 6 102 5 308 5 -39 6 47 5 -1355 421 | 6 -120 5 1117 5 -33 6 985 5 -1055 5 -441 6 -589 5 1355 422 | 5 -653 6 -613 5 1990 5 -965 6 519 5 -1887 6 -49 5 1520 423 | 5 -1204 6 440 5 1353 952 1526 100 MP stroke 424 | 5 -490 6 499 5 -290 5 -748 6 -1236 5 1513 5 -441 6 -512 425 | 5 446 904 2785 10 MP stroke 426 | gr 427 | 428 | 429 | end %%Color Dict 430 | 431 | eplot 432 | %%EndObject 433 | 434 | epage 435 | end 436 | 437 | showpage 438 | 439 | %%Trailer 440 | %%BoundingBox: 83 215 553 589 441 | %%Pages: 001 442 | %%EOF 443 | -------------------------------------------------------------------------------- /formants.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abodedaniel/Signal-Estimation-and-Processing/c9c089fbc848477f66c502cc6a89b245aafb18ae/formants.m -------------------------------------------------------------------------------- /i.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abodedaniel/Signal-Estimation-and-Processing/c9c089fbc848477f66c502cc6a89b245aafb18ae/i.wav -------------------------------------------------------------------------------- /iden.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abodedaniel/Signal-Estimation-and-Processing/c9c089fbc848477f66c502cc6a89b245aafb18ae/iden.m -------------------------------------------------------------------------------- /o.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abodedaniel/Signal-Estimation-and-Processing/c9c089fbc848477f66c502cc6a89b245aafb18ae/o.wav -------------------------------------------------------------------------------- /p_dom.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abodedaniel/Signal-Estimation-and-Processing/c9c089fbc848477f66c502cc6a89b245aafb18ae/p_dom.m -------------------------------------------------------------------------------- /p_dom.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abodedaniel/Signal-Estimation-and-Processing/c9c089fbc848477f66c502cc6a89b245aafb18ae/p_dom.mat -------------------------------------------------------------------------------- /recon.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abodedaniel/Signal-Estimation-and-Processing/c9c089fbc848477f66c502cc6a89b245aafb18ae/recon.m -------------------------------------------------------------------------------- /synthe.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abodedaniel/Signal-Estimation-and-Processing/c9c089fbc848477f66c502cc6a89b245aafb18ae/synthe.m -------------------------------------------------------------------------------- /synthe22.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abodedaniel/Signal-Estimation-and-Processing/c9c089fbc848477f66c502cc6a89b245aafb18ae/synthe22.mat -------------------------------------------------------------------------------- /test.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abodedaniel/Signal-Estimation-and-Processing/c9c089fbc848477f66c502cc6a89b245aafb18ae/test.m -------------------------------------------------------------------------------- /tryef.m: -------------------------------------------------------------------------------- 1 | plot(abs(fft(A))) -------------------------------------------------------------------------------- /tryingT.m: -------------------------------------------------------------------------------- 1 | % Assume we capture 8192 samples at 1kHz sample rate 2 | Nsamps = 8192; 3 | fsamp = 1000; 4 | Tsamp = 1/fsamp; 5 | t = (0:Nsamps-1)*Tsamp; 6 | % Assume the noisy signal is exactly 123Hz 7 | fsig = 123; 8 | signal = sin(2*pi*fsig*t); 9 | noise = 1*randn(1,Nsamps); 10 | x = signal + noise; 11 | % Plot time-domain signal 12 | subplot(2,1,1); 13 | plot(t, x); 14 | ylabel('Amplitude'); xlabel('Time (secs)'); 15 | axis tight; 16 | title('Noisy Input Signal'); 17 | % Choose FFT size and calculate spectrum 18 | Nfft = 1024; 19 | [Pxx,f] = pwelch(A,gausswin(Nfft),Nfft/2,Nfft,Fe); 20 | % Plot frequency spectrum 21 | subplot(2,1,2); 22 | plot(f,Pxx); 23 | ylabel('PSD'); xlabel('Frequency (Hz)'); 24 | grid on; 25 | % Get frequency estimate (spectral peak) 26 | [~,loc] = max(Pxx); 27 | FREQ_ESTIMATE = f(loc) 28 | title(['Frequency estimate = ',num2str(FREQ_ESTIMATE),' Hz']); -------------------------------------------------------------------------------- /trying_synthesis.m: -------------------------------------------------------------------------------- 1 | N_TF=8192; 2 | Te = 1/Fe; 3 | T = 5e-3; 4 | s = A; 5 | Num = 1; 6 | e=zeros(1,length(s)+500); 7 | e(1:round(T/Te):length(s))=1; %%input signal 8 | t=(1:length(e))*Te; 9 | s=[s zeros(1,length(t)-length(s))]; 10 | s_synthe=filter(Num,Den,e); s_synthe=s_synthe-mean(s_synthe); 11 | TF_s_synthe=fft(s_synthe,N_TF); 12 | figure(1); 13 | subplot(211); plot(t,s,'b'); title('recorded A') 14 | subplot(212); plot(t,e,'g'); title('input') 15 | xlabel('t (s)'); figure(2); 16 | subplot(211); plot(t,e,'g'); title('input') 17 | subplot(212); plot(t,s_synthe,'r'); title('synthensized A'); 18 | xlabel('t (s)'); figure(3); 19 | subplot(211); plot(t,s,'b'); title('recorded A') 20 | subplot(212); plot(t,s_synthe,'r'); title('synthensized A'); 21 | xlabel('t (s)'); figure(4); 22 | z=round(length(s)/4):round(length(s)/2); 23 | subplot(211); plot(t(z)*1e3,s(z),'b'); title('recorded A') 24 | subplot(212); plot(t(z)*1e3,s_synthe(z),'r'); title('synthesized A'); 25 | xlabel('t (*s)'); figure(5); 26 | n=round(N/3); 27 | TF_s=fft(s,N_TF); TF_s=TF_s(1:N_TF/2); 28 | subplot(211); plot(f(1:n)*1e-3,abs(TF_s(1:n))/max(abs(TF_s)),'b'); 29 | title('Tranfer function of recorded A '); 30 | subplot(212); plot(f(1:n)*1e-3,abs(TF_s_synthe(1:n))/max(abs(TF_s_synthe)),'r'); 31 | title('Transfer Function of synthesized A'); 32 | xlabel('f (kHz)'); -------------------------------------------------------------------------------- /u.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abodedaniel/Signal-Estimation-and-Processing/c9c089fbc848477f66c502cc6a89b245aafb18ae/u.wav -------------------------------------------------------------------------------- /visu.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abodedaniel/Signal-Estimation-and-Processing/c9c089fbc848477f66c502cc6a89b245aafb18ae/visu.m --------------------------------------------------------------------------------