1
$\begingroup$

Using MATLAB signal processing toolbox, I have created signals like dirichlet, chirp and etc and and obtained their fourier and cosine fourier transform. Now I want to find the frequency where for example A% frequencies are less than that and use it as a thresholding frequency to compact the signal and eliminate unnecessary details? Could you please tell me a little more about thresholding frequencies and how to choose them in signal processing?

$\endgroup$
  • $\begingroup$ @John, please post your comment as an answer. I doubt this question will get any proper attention otherwise. $\endgroup$ – Phonon May 13 '14 at 4:05
1
$\begingroup$

A Matlab code and illustration is given below, with the discrete cosine transform (DCT):

nSample = 512;
pDataThreshold = 90/100 ; % percentage, as a float in [0 1]

time = linspace(0,1,nSample)';
data = sin(2*pi*4*sqrt(time));
dataTrans = dct(data);
dataThreshold = quantile(abs(dataTrans),pDataThreshold);
dataTransThreshold = dataTrans;
dataTransThreshold(abs(dataTrans) < dataThreshold) = 0;
dataCompact = idct(dataTransThreshold);

plot(time,[data,dataCompact]);
xlabel('Time')
ylabel('Amplitude')
legend('Data',['DataCompact (',num2str(100*pDataThreshold),'%)'])
grid on

enter image description here

$\endgroup$
0
$\begingroup$

If I understand you correctly, you should be able to sort all N bins by increasing magnitude, select the magnitude at position A*N/100 in the sorted array, and then discard any frequencies with magnitude less than that in the original array.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.