?? gcv.m
字號:
function gcv = gcv(x,t)
% gcv: Applies soft-threshold t to all elements of x and computes the generalized
% cross-validation threshold needed by the MINGCV procedure.
% Usage
% gcv = gcv(x,t)
% Inputs
% x input wavelet coefficients, length= 2^J
% t soft threshold
% Outputs
% gcv generalized cross-validation threshold
%===========
%借用別人的gcv程序
%===========
%x=[1:64];
%t = 8;
N = length(x);
res = abs(x) - t;
% test = (res <= 0);
N0 = sum(res <= 0);
y = sign(x).*res.*(res >= 0);
if (N0 == 0)
gcv = 1000;
else
gcv = N * (norm(y-x) / N0 )^2 ;
end
% Acknowledgements
%
% This code is based on a Matlab Code written and kindly provided by M. Jansen
%
% Copyright (c) 2001
%
% Anestis Antoniadis, Jeremie Bigot
% Laboratoire IMAG-LMC
% University Joseph Fourier
% BP 53, 38041 Grenoble Cedex 9
% France.
%
% mailto: Anestis.Antoniadis@imag.fr
% mailto: Jeremie.Bigot@imag.fr
%
% and
%
% Theofanis Sapatinas
% Department of Mathematics and Statistics
% University of Cyprus
% P.O. Box 20537
% CY 1678 Nicosia
% Cyprus.
%
% mailto: T.Sapatinas@ucy.ac.cy
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -