How to find the threshold of a matrix?

Iam working on FFT algorithm.The FFT is applied to an image and it resulted in complex number matrix.Now I have to find threshold of the FFT resulted matrix and set the values of matrix to zero which are below threshold.Then apply IFFT to reconstruct.But Iam not able to find threshold of matrix.Any help appreciated.Thanks in advance

 Respuesta aceptada

Greg Heath
Greg Heath el 27 de Dic. de 2012
rng(0)
x = randn(1,32);
X = fft(x);
absX = abs(X);
M = max(absX);
absX(absX < M/100) = 0;
z = ifft(absX.*exp(i*angle(X)));
err = max(abs(z-x))
err =
4.4419e-016
Thank you for formally accepting my answer
Greg

Más respuestas (0)

Categorías

Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 27 de Dic. de 2012

Community Treasure Hunt

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

Start Hunting!

Translated by