Effacer les filtres
Effacer les filtres

How to make a unit energy signal?

6 vues (au cours des 30 derniers jours)
Jaya Sodhani
Jaya Sodhani le 5 Juil 2022
Réponse apportée : Chunru le 5 Juil 2022
y=audioread('speech.wav');
subplot(2,3,1);
plot(y);
xlabel('Samples');
ylabel('Magnitude');
title('Original speech signal');
%adding awgn noise
x=awgn(y,5);
z=y+x;
%sound(z);
subplot(2,3,2);
plot(z);
xlabel('Samples');
ylabel('Magnitude');
title('Noise added to speech signal');
The amplitude of signal 'z' is greater than 1. I want to make it a unit enegry signal. How can i make it?

Réponse acceptée

Chunru
Chunru le 5 Juil 2022
%y=audioread('speech.wav');
y = rand(1000, 1);
subplot(2,3,1);
plot(y);
xlabel('Samples');
ylabel('Magnitude');
title('Original speech signal');
%adding awgn noise
x=awgn(y,5);
z=y+x;
% Normalize into [-1 1] (not unit energy)
z = z / max(abs(z));
%sound(z);
subplot(2,3,2);
plot(z);
xlabel('Samples');
ylabel('Magnitude');
title('Noise added to speech signal');

Plus de réponses (0)

Catégories

En savoir plus sur Audio Processing Algorithm Design dans Help Center et File Exchange

Produits


Version

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by