Why is this the requirement for stftmag2sig's input signal and reconstructed signal to be same length? length(x)-​noverlap)/​(length(wi​ndow)-nove​rlap) = integer

4 次查看(过去 30 天)
Why is it that "if you want x (original signal) and s (reconstructed signal) to be the same length, the value of (length(x)-noverlap)/(length(window)-noverlap) must be an integer. Use Window to specify the length of window and OverlapLength to specify noverlap" for the stftmag2sig function? This quote was taken directly from the stftmag2sig documentation, which you can find at the following link:

采纳的回答

Vinay
Vinay 2025-6-17
Hi @Paige,
The Short time fourier transform(STFT) splits the signal(x) into overlapping segments and reconstruct the original signal by adding the transformed segments.
The STFT divides 'x' into overlapping frames/windows. The number of frames depends on:
  • Length of 'x'
  • Window length
  • Amount of overlap('noverlap')
The number of frames is approximately:
When the number of frames is an integer, the signal x is perfectly segmented using the specified window and overlap. If not, the last frame is partial or padded, leading to a reconstructed signal that differs in length from the original.
Example
  • Window length = 128 samples
  • Overlap (noverlap) = 96 samples (which is 75% overlap)
Case 1: length(x) = 1024
The ratio is 29, so the STFT divides the signal into 29 complete overlapping windows, allowing accurate reconstruction with the original signal length.
Case 2: length(x) = 1000
The ratio is 28.25, resulting in an incomplete final window that requires padding or truncation. As a result, the reconstructed signal may be shorter or longer than the original.
I hope this resolves the query.​

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Time-Frequency Analysis 的更多信息

产品


版本

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by