[95fe2b]: wavelets / went_compn.m  Maximize  Restore  History

Download this file

14 lines (10 with data), 293 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
function E = went_compn(x,p,f)
% 0<p<=2
assert(0<p&&p<=2,'Parameter p have to be in the range ]0,2]');
assert(0<f&&f<1,'Parameter f have to be in the range ]0,1[');
%u = x./norm(x);
v = sort(abs(x(:)),'descend');
wnom = cumsum(v.^p);
wden = sum(v.^p);
w = wnom./wden;
[~,E]=min(abs(w-f));

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks