clear all;
close all;
alpha = input("Enter alpha value :\n");
c_ms = input("Enter c value in ms :\n");
c = c_ms*0.001; %convert c to seconds
fmin = 0;
fmax = 20000;
w = 2*pi*fmin:0.01:2*pi*fmax;
%%%%%%%%%%%%%%% solution to 4.1 %%%%%%%%%%%%%%%%%%
Hw = sqrt((1+alpha^2) + 2*alpha*cos(w*c));
figure;plot(w, Hw)
titletext1=['|H(w)| vs w for alpha = ', num2str(alpha),' and c = ',
num2str(c_ms),' ms'];
title(titletext1);
xlabel('w=2*pi*f (rad/s) ----> ');
ylabel('|H(w)|');
xlim([min(w) max(w)]);
%%%%%%%%%%%%%%% Solution to part 4.2 %%%%%%%%%%%%%%%%%%%%
Xw = (50000*w)./(2*pi*2000+w).^2;
figure;plot(w,Xw);
title('X(w) vs w ');
xlabel('w=2*pi*f (rad/s) ----> ');
ylabel('X(w)');
xlim([min(w) max(w)]);
Yw = Hw.*Xw;
figure;plot(w,Yw);
titletext2=['Y(w) vs w for alpha = ', num2str(alpha),' and c = ',
num2str(c_ms),' ms'];
title(titletext2);
xlabel('w=2*pi*f (rad/s) ----> ');
ylabel('Y(w)');
xlim([min(w) max(w)]);
%%%%%%%%%%%%%%%% Solution to part 4.3 %%%%%%%%%%%%%
xt = abs(ifftshift(ifft(Xw))); % time domain signal from
frequency domain signal
audiowrite('x.wav',xt,2*fmax); % save x(t) in .wav format
yt = abs(ifftshift(ifft(Yw)));
% different filename for different alpha and c
audio_title = ['y_alpha_',num2str(alpha),'_c_',
num2str(c_ms),'.wav'];
audiowrite(audio_title,yt,2*fmax); % save y(t) in .wav format
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Plots of |H(w)| for difference values of alpha and c:



Plot of X(w) [independent of alpha and c] :

Plots of Y(w) for difference values of alpha and c:



4. Using Matlab: 4.1. Plot | H(n the following cases: (the frequency range: 0-20 KHz) a. a 0.2 0.5 ms. b. α-0.8 C.α-0.2 c-0.1 ms. c 0.5 ms. 4.2. Consider a signal whose Fourier Transform is given...