% Delay values
tau = 0:0.01e-6:5e-6;
% Exponential Power Delay Profile
P = 2*exp(-tau/1e-6);
% Total power
P_total = trapz(tau,P);
% Mean excess delay
mean_delay = trapz(tau,tau.*P)/P_total;
% RMS delay spread
rms_delay = sqrt(trapz(tau,(tau-mean_delay).^2.*P)/P_total);
% Display results
fprintf('Mean Excess Delay = %.4f microseconds\n',mean_delay*1e6);
fprintf('RMS Delay Spread = %.4f microseconds\n',rms_delay*1e6);
% Plot
figure;
plot(tau*1e6,P,'r','LineWidth',2);
grid on;
xlabel('Delay (\mus)','FontSize',14);
ylabel('Power','FontSize',14);
title('Power Delay Profile','FontSize',16);
To embed this project on your website, copy the following code and paste it into your website's HTML: