Borrar filtros
Borrar filtros

Get the frequencies at specific value of amplitude

12 visualizaciones (últimos 30 días)
Abdul Rahim
Abdul Rahim el 10 de Mzo. de 2023
Comentada: Abdul Rahim el 18 de Ag. de 2024 a las 12:16
Hello everyone, I want to split the signal using the Gabor transform and then taking the values of frequency against the maximum value of amplitude within each window. Thank you for helping me.

Respuesta aceptada

Vinay
Vinay el 16 de Ag. de 2024 a las 9:21
Hii Abdul,
The Short-Time Fourier Transform (STFT) divides a longer signal into smaller segments of equal length and computes the Fourier transform separately for each segment. The frequency corresponding to the maximum amplitude within a specific window can be analyzed using the code provided below.
% Parameters
Fs = 22000;
t = 0:1/Fs:1;
windowLength = 256;
overlap = 128;
signal = sin(2*pi*50*t) + 0.5*randn(size(t)); % Signal with noise
% Short-Time Fourier Transform (STFT)
[S, F, T] = stft(signal, Fs, 'Window', hamming(windowLength), 'OverlapLength', overlap, 'FFTLength', windowLength);
% Initialize vector to hold frequencies
maxFreqs = zeros(size(T));
% Loop to find the frequency of maximum amplitude
for k = 1:length(T)
[~, maxIdx] = max(abs(S(:, k)));
% frequency of the maximum amplitude
maxFreqs(k) = F(maxIdx);
end
% Display the results
disp('Frequencies of maximum amplitude in each window:');
disp(maxFreqs);
Kindly refer to the following documentation for “short time fourier transform:
I hope this helps!
  1 comentario
Abdul Rahim
Abdul Rahim el 18 de Ag. de 2024 a las 12:16
Thank you for taking the time to read my question and answer it.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Fourier Analysis and Filtering en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by