Home > phiwave > @phiw_wvimg > private > pr_sure_thresh.m

pr_sure_thresh

PURPOSE ^

Adaptive Threshold Selection Using Principle of SURE

SYNOPSIS ^

function thresh = pr_sure_thresh(x)

DESCRIPTION ^

 Adaptive Threshold Selection Using Principle of SURE
 FORMAT thresh = pr_sure_thresh(x)

 Inputs 
 y        - Noisy Data with Std. Deviation = 1
 
 Outputs 
 thresh   - Value of Threshold

 Description
 SURE refers to Stein's Unbiased Risk Estimate.

 Federico Turkheimer

 $Id: pr_sure_thresh.m,v 1.1 2005/06/05 04:17:42 matthewbrett Exp $

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function thresh = pr_sure_thresh(x)
0002 % Adaptive Threshold Selection Using Principle of SURE
0003 % FORMAT thresh = pr_sure_thresh(x)
0004 %
0005 % Inputs
0006 % y        - Noisy Data with Std. Deviation = 1
0007 %
0008 % Outputs
0009 % thresh   - Value of Threshold
0010 %
0011 % Description
0012 % SURE refers to Stein's Unbiased Risk Estimate.
0013 %
0014 % Federico Turkheimer
0015 %
0016 % $Id: pr_sure_thresh.m,v 1.1 2005/06/05 04:17:42 matthewbrett Exp $
0017 
0018   a = sort(abs(x)).^2 ;
0019   b = cumsum(a);
0020   n = length(x);
0021   c = linspace(n-1,0,n);
0022   s = b+c.*a;
0023   risk = (n - ( 2 .* (1:n ))  + s)/n;
0024   [guess,ibest] = min(risk);
0025   thresh = sqrt(a(ibest));
0026

Generated on Wed 06-Jul-2005 18:07:21 by m2html © 2003