Set signal level to -3dB
Afficher commentaires plus anciens
I have a sound, and from that sound a get a signal form and spectrum and i need to set this sound signal level to -3dB how to do that.
if true
% code
endclear all; close all; clc %
[y,Fs] = audioread('Kulka.wav');
s = y(:,1);
N = length(s);
n = 1:N ; % imtis
S=fft(s); % signalo FFT
Faxis=(n-1)*Fs/N; % dazniu asis
Sa = abs(S)/(N/2); % amplitude
figure(1) % FFT atvaizdavimas
plot(Faxis, Sa)
xlabel('Daznis, Hz');
ylabel('Amplitude, V');
title('FFT');
xlim ([0 Fs/2]); grid on
nfft = 1024; % spektrogramos pradzia
window = nfft;
noverlap = window-10;
sound(s,44100); %garso atkurimas
figure(2) % Spektrogamos atvaizdavimas
specgram(s,nfft,Fs,window,noverlap) % Spektrograma
xlabel('Laikas, s');
ylabel('Daznis, Hz');
title('Spektrograma');
Réponses (0)
Catégories
En savoir plus sur Spectral Measurements dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!