plateform
stringclasses
1 value
repo_name
stringlengths
13
113
name
stringlengths
3
74
ext
stringclasses
1 value
path
stringlengths
12
229
size
int64
23
843k
source_encoding
stringclasses
9 values
md5
stringlengths
32
32
text
stringlengths
23
843k
github
indigits/sparse-plex-master
contents.m
.m
sparse-plex-master/library/+spx/contents.m
1,276
utf_8
1120acbea277ab250216ada17e84dafd
function contents() % Lists contents of spx package root = fileparts(which('spx.locate')); process_dir(root, 'spx') end function process_dir(directory, package_name) packages = dir([directory, filesep '+*']); mat_files = dir([directory, filesep '*.m']); for i=1:numel(packages) subpac...
github
indigits/sparse-plex-master
synthetic.m
.m
sparse-plex-master/library/+spx/+data/synthetic.m
467
utf_8
485e7912adfecf2a1e5c91d96a80dd6a
classdef synthetic methods(Static) function signal = picket_fence(N) import spx.discrete.number; if ~number.is_perfect_square(N) error('N must be perfect square'); end n = sqrt(N); signal = zeros(1, N); signal(1:n:end) = 1; end function X = uniform(N, S) % Generates uniformly dis...
github
indigits/sparse-plex-master
mtx_mkt.m
.m
sparse-plex-master/library/+spx/+data/mtx_mkt.m
558
utf_8
b11bac99173e5a5a76139d3134559321
% Wrapper for files from matrix market classdef mtx_mkt methods(Static) function A = abb313() A = read_file('abb313.mtx'); end function A = bfwb398() A = read_file('bfwb398.mtx'); end function A = cryg10000() A = read_file('cryg10000.mtx'); end function A = illc1850() A = read_file('illc1850.mtx');...
github
indigits/sparse-plex-master
func.m
.m
sparse-plex-master/library/+spx/+data/+synthetic/func.m
532
utf_8
e98c7fbe21251aa1911cdf8dc7619cb2
classdef func methods(Static) function [x, y, res] = sinusoid(varargin) params = inputParser; params.addParameter('n', 10); params.addParameter('sigma', 0.1); params.addParameter('min', 0); params.addParameter('max', 1); params.addParameter('theta', 0); params.addParameter('f', 1); pa...
github
indigits/sparse-plex-master
lowrank.m
.m
sparse-plex-master/library/+spx/+data/+synthetic/lowrank.m
278
utf_8
0d62ebdec5b9767e5410ad9b1dd12cad
classdef lowrank % Generates matrices of low rank methods(Static) function A = from_randn(m, n, r) % Returns a low rank matrix constructed by randn(m, r) * randn(r, m) X = randn(m, r); Y = randn(r, n); A = X * Y; end % function end % methods end % classdef
github
indigits/sparse-plex-master
roots.m
.m
sparse-plex-master/library/+spx/+opt/roots.m
761
utf_8
be3c7ec9d664f4da382081d73a4a6d99
classdef roots methods(Static) % Public static methods function [x, change, iterations] = newton(f, df, x0, tolerance, max_iters) if nargin < 2 error("function and its derivative handles must be provided."); end if nargin < 3 error('Initial estimate must be provided'); end if nargin < 4 tolerance = 1e-...
github
indigits/sparse-plex-master
projections.m
.m
sparse-plex-master/library/+spx/+opt/projections.m
517
utf_8
2460c55ed9b2873183617c5e05d2c6a2
classdef projections % projections to different convex sets methods(Static) function x = proj_l2_ball(x, radius) % project x to an l2 ball of given radius if nargin < 2 radius = 1; end x_norm = norm(x); if x_norm > radius x = (radius / x_norm) * x; end end function x = proj...
github
indigits/sparse-plex-master
ls.m
.m
sparse-plex-master/library/+spx/+opt/ls.m
1,634
utf_8
1ddf981ddffba48cc0af93b019b75c2d
classdef ls % Most of these methods are for reference only % MATLAB provides high quality implementation of % Least Squares problems. methods(Static) function x = normal_eq(A, b) % Method of normal equations % GVL4 algorithm 5.3.1 import spx.la.tris; % Form the normal equations A' A x = A' b % W...
github
indigits/sparse-plex-master
test_cg_ls.m
.m
sparse-plex-master/library/+spx/+opt/convex_optimization/conjugate_gradient/tests/test_cg_ls.m
930
utf_8
124b223cae50a142984a52381c8598e7
function test_suite = test_cg_ls clear all; initTestSuite; end function test_1 A = [ 1 -1 1 1 2 1 ]; B = [ 2 4 8 ]; solver = SPX_CGLeastSquare(A, B); x = solver.solve(); %solver.printResults(); verifyTrue(testCase, solver.hasConverged()); end function...
github
indigits/sparse-plex-master
test_conjugate_gradients.m
.m
sparse-plex-master/library/+spx/+opt/convex_optimization/conjugate_gradient/tests/test_conjugate_gradients.m
571
utf_8
5e7f9211ff3ff1d7da43dca1895e547a
function test_suite = test_conjugate_gradients clear all; initTestSuite; end function test_1 A = [3 2; 2 6]; X = [2 1 0 4; -2 2 0 4]; B = A * X; solver = SPX_ConjugateDescent(A, B); x = solver.solve(); %solver.printResults(); verifyTrue(testCase, solver.hasConverged()); end functi...
github
indigits/sparse-plex-master
test_steepest_descent.m
.m
sparse-plex-master/library/+spx/+opt/convex_optimization/steepest_descent/tests/test_steepest_descent.m
626
utf_8
563c6559946317622b3c6016b7a6045c
function test_suite = test_steepest_descent clear all; initTestSuite; end function test_1 A = [3 2; 2 6]; X = [ 2 1 0 4; -2 2 0 4]; B = A * X; solver = SPX_SteepestDescent(A, B); x = solver.solve(); %solver.printResults(); verifyTrue(testCase, solver.hasConverged()); end ...
github
indigits/sparse-plex-master
bp.m
.m
sparse-plex-master/library/+spx/+opt/+admm/bp.m
3,886
utf_8
c2da7de7a8615216f5aee5821d32b8fc
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Main problem is minimize \| A x \|_1 subject to A x = b % We introduce z = A x - b % x \in R^n A \in R^{m x n} b \in R^m % m < n % ADMM terms % minimize f(x) + g(z) subject to A x + B z = c % f(x) : {x \in R^n | Ax = b} % g(z) : \| z \|_1 % minimize f(x) + \| z ...
github
indigits/sparse-plex-master
lad.m
.m
sparse-plex-master/library/+spx/+opt/+admm/lad.m
3,540
utf_8
3a6ee0c54d1d99663a506f1845eb0a65
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Main problem is minimize \| A x - b \|_1 % We introduce z = A x - b % Equivalent problem % Minimize \|z \|_1 subject to Ax - z = b % ADMM terms % minimize f(x) + g(z) subject to A x + B z = c % f(x) : 0 % g(z) : \| z \|_1 % A : A % B : -1 % c : b % Primal residu...
github
indigits/sparse-plex-master
hessenberg.m
.m
sparse-plex-master/library/+spx/+la/hessenberg.m
4,077
utf_8
bfc17fdb16dc80e843fbe14bc481d89d
classdef hessenberg % Functions to work with Hessenberg forms methods(Static) function [Q, R] = qr(A) % Givens method for computing the QR factorization A = QR of a Hessenberg matrix. % A is modified in the algorithm % GVL4: algorithm 5.2.5 import spx.la.givens.rotation; [n,n] = size(A); % Sp...
github
indigits/sparse-plex-master
lu.m
.m
sparse-plex-master/library/+spx/+la/lu.m
1,878
utf_8
ced933554c935c386448406fb956ff11
classdef lu methods(Static) function [L, U] = outer(A) % Computes the A = LU factorization without pivoting % This is an outer product version of LU factorization % A is modified in the algorithm % GVL4: algorithm 3.2.1 [n,n] = size(A); for k=1:n-1 % identify the range rho = k+...
github
indigits/sparse-plex-master
tris.m
.m
sparse-plex-master/library/+spx/+la/tris.m
1,474
utf_8
fd96cd2c5324f850c96547c7291d18e7
classdef tris methods(Static) function x = forward_row(L,b) % Solvex L x = b problem by forward substitution row wise % b gets overwritten in the process % GVL4: algorithm 3.1.1 n = length(b); % start from last row for i=1:n b(i) = (b(i) - L(i, 1:i-1)* b(1:i-1)) / L(i,i); end x...
github
indigits/sparse-plex-master
house.m
.m
sparse-plex-master/library/+spx/+la/house.m
8,116
utf_8
c6ef1a26355907a1aa32963587002405
classdef house methods(Static) function [v, beta] = gen(x) % Generates the householder reflection vector for a given vector x % P = I - beta * v * v' is the householder projection matrix % P is an orthogonal projector % P *x changes x in such a way that only 1st entry is non-zero % GVL4: algorithm...
github
indigits/sparse-plex-master
pca.m
.m
sparse-plex-master/library/+spx/+la/pca.m
1,602
utf_8
d1642f4e8187634685ca8d66d3d08953
classdef pca % Methods related to principal component analysis methods(Static) %% low_rank_approx: Computes the lower rank approximation of a data set function Xp = low_rank_approx(X, n) % X : the data set to be approximated % n : number of dimensions [M, S] = size(X); if n == 0 Xp = X; ...
github
indigits/sparse-plex-master
schur.m
.m
sparse-plex-master/library/+spx/+la/schur.m
5,780
utf_8
992d169ea62fd1539485467f62952b63
classdef schur % Methods for computing the Schur form methods(Static) function kappa = wilk_shift(a,b,c,d) % Computes the Wilkinson shift for 2x2 sub-matrix kappa = d; % check if the matrix is 0 s = abs(a) + abs(b) + abs(c) + abs(d); if (s == 0) % nothing to do return; end ...
github
indigits/sparse-plex-master
givens.m
.m
sparse-plex-master/library/+spx/+la/givens.m
2,134
utf_8
94911f12f8fd425d3d857aabe8e9f1ba
classdef givens methods(Static) function [c,s] = rotation(a,b) % Givens rotation computation % Determines cosine-sine pair (c,s) so that [c s;-s c]'*[a;b] = [r;0] % G = [c s; -s c] % x = [a; b] % G' x = [r; 0] % GVL4: algorithm 5.1.3 if b==0 % No rotation needed c = 1; s =...
github
indigits/sparse-plex-master
qr.m
.m
sparse-plex-master/library/+spx/+la/qr.m
4,452
utf_8
1f0f19f5a9af2774129a000acb6fc979
classdef qr % Algorithms related to QR factorization % These are mostly for reference methods(Static) function [Q, R] = gram_schmidt(A) [m, n] = size(A); if m < n error('Wide matrices not supported'); end Q = zeros(m, n); R = zeros(n, n); for j=1:n % pick up the j-th column f...
github
indigits/sparse-plex-master
eig.m
.m
sparse-plex-master/library/+spx/+la/eig.m
3,909
utf_8
ba10222f451e864395e949c4b5d5a51f
classdef eig methods(Static) function [x, lambda, details] = power(A, x, options) % Power method for computing the largest eigen value and vector of A % GVL4: section 7.3.1 if nargin < 3 options = struct; end tolerance = 1e-6; if isfield(options, 'tolerance') tolerance = option...
github
indigits/sparse-plex-master
chol.m
.m
sparse-plex-master/library/+spx/+la/chol.m
367
utf_8
531982866baf3e1f2f3b625e0c6d1dbb
classdef chol methods(Static) function L_new = chol_update(L, atom) n = size(L, 1); if n == 0 L_new = sqrt(atom); return; end v = atom(1:end-1); c = atom(end); opts.LT = true; w = linsolve(L, v, opts); c_new = sqrt(c - w' * w); L_new = [L zeros(n, 1); w' c_new]; end...
github
indigits/sparse-plex-master
lanczos.m
.m
sparse-plex-master/library/+spx/+la/+svd/lanczos.m
25,702
utf_8
3cb25bf7ca40d0983251c54bdb2c3b1c
classdef lanczos % The code in this file is largely based on the code and papers for PROPACK % developed by Rasmus Munk Larsen, 1998. methods(Static) function [U, B, V, p, details] = bd(A, k, options) % Perform bidiagonalization using Lanczos iterations % The U,V vectors are not re-orthogonalized % Based...
github
indigits/sparse-plex-master
bht.m
.m
sparse-plex-master/library/+spx/+ssp/bht.m
4,383
utf_8
7fc5948f018118c552cda89042e621d0
classdef bht methods (Static) function [ R] = bayes_risk( C, PF, PD, P1) %BAYES_RISK Computes the Bayes risk PM = 1 - PD; P0 = 1 - P1; C00 = C(1,1); C10 = C(2,1); C01 = C(1,2); C11 = C(2,2); R = (1 - PF) * P0 * C00 + PM * P1 * C01 ... + PF * P0 * C10 + PD * P1 * C11; end f...
github
indigits/sparse-plex-master
L1_ADMM_YZ.m
.m
sparse-plex-master/library/+spx/+pursuit/+single/L1_ADMM_YZ.m
13,791
utf_8
18a30bcef488c464fce9d5735873feb0
classdef L1_ADMM_YZ < handle % Solver for various L1 minimization problems % based on the 2011 paper by % Junfeng Yang and Yin Zhang properties % weight for the quadratic penalty term rho % verbosity verbose % Maximum number of ADMM iterations max_iterations % relative tolerance t...
github
indigits/sparse-plex-master
subspace.m
.m
sparse-plex-master/library/+spx/+cluster/subspace.m
14,777
utf_8
7f9d3b8fdb1b8b1607cdc0008cc4cfd8
classdef subspace methods(Static) function result = ssc_l1_mahdi(X, options) if nargin > 1 else % empty options options = struct; end cvx_solver sdpt3 cvx_quiet(true); [M, S] = size(X); % M is ambient dimension % S is number of signals % storage for coefficients ...
github
indigits/sparse-plex-master
OMP_REPR_METHOD.m
.m
sparse-plex-master/library/+spx/+cluster/+ssc/OMP_REPR_METHOD.m
1,043
utf_8
4431222d5770b34058c49aa25545ddc8
classdef OMP_REPR_METHOD % method for computing OMP based representations enumeration CLASSIC_OMP_C BATCH_OMP_C FLIPPED_OMP_MATLAB BATCH_FLIPPED_OMP_MATLAB BATCH_FLIPPED_OMP_C GOMP_C MC_OMP end methods function result = isClassicOMP_C(self) result = (self == spx.cluster.ssc.OMP_REPR_ME...
github
indigits/sparse-plex-master
poly_thresh_numeric.m
.m
sparse-plex-master/library/+spx/+cluster/+lrsc/poly_thresh_numeric.m
2,374
utf_8
e05a2060ac783e4d147453c2b1d1a456
%-------------------------------------------------------------------------- % [A,C] = polythreshAP(D,tau,alpha) % Low Rank Subspace Clustering algorithm for data lying in a union of % subspaces and contaminated with outliers % % min |C|_* + tau/2*|A-AC|_F^2 + alpha/2*|D-A|_F^2 s.t. C = C' % % C = affinity matrix % A ...
github
indigits/sparse-plex-master
poly_thresh_closed_form.m
.m
sparse-plex-master/library/+spx/+cluster/+lrsc/poly_thresh_closed_form.m
2,046
utf_8
71450c79ae0575d009acfbdf865a1599
%-------------------------------------------------------------------------- % [A,C] = poly_thresh_closed_form(D,tau,alpha) % Low Rank Subspace Clustering algorithm for data lying in a union of % subspaces and contaminated with outliers % % min |C|_* + tau/2*|A-AC|_F^2 + alpha/2*|Delta-A|_F^2 s.t. C = C' % % C = affin...
github
indigits/sparse-plex-master
noisy_relaxed.m
.m
sparse-plex-master/library/+spx/+cluster/+lrsc/noisy_relaxed.m
1,268
utf_8
8a94f4ea44728b00c65c9082c63c0d1d
%-------------------------------------------------------------------------- % [C,A] = noisy_relaxed(D,tau,alpha,useSampledPolynoimial) % Low Rank Subspace Clustering algorithm for noisy data lying in a % union of subspaces % % (C,A) = argmin |C|_* + tau/2*|A - AC|_F^2 + alpha/2*|D - A|_F^2 s.t. C = C' % % C = affinity...
github
indigits/sparse-plex-master
clean_relaxed.m
.m
sparse-plex-master/library/+spx/+cluster/+lrsc/clean_relaxed.m
959
utf_8
ab8a76e8befc68cc62e8eaa4090c3caf
%-------------------------------------------------------------------------- % C = lrsc(A,tau) % Low Rank Subspace Clustering algorithm for clean data lying in a % union of subspaces % % C = argmin |C|_* + tau/2 * |A - AC|_F^2 s.t. C = C' % % A: clean data matrix whose columns are points in a union of subspaces % tau: ...
github
indigits/sparse-plex-master
noisy_exact.m
.m
sparse-plex-master/library/+spx/+cluster/+lrsc/noisy_exact.m
505
utf_8
18657253291cb7d9a264196dfecfcadd
function [A,C] = noisy_exact(D,alpha,~) % Implements the solution of noisy data with exact condition A = AC if nargin < 2 tau = 100/norm(D)^2; alpha = 0.5*tau; end % eq 41, theorem 5 threshold = sqrt(2/alpha); options = struct; options.lambda = threshold; options.toleran...
github
indigits/sparse-plex-master
DFTBasis.m
.m
sparse-plex-master/library/+spx/+dict/DFTBasis.m
934
utf_8
ef9ca57891fcda4068f7724ae1c97b9d
classdef DFTBasis < spx.dict.Operator properties(SetAccess=private) % Dimensions N end methods function self = DFTBasis(N) if nargin < 1 error('Basis dimensions must be specified'); end self.N = N; end function [mm, nn] = get_size(self) mm = self.N; nn = self.N; end function r...
github
indigits/sparse-plex-master
rip.m
.m
sparse-plex-master/library/+spx/+dict/rip.m
2,862
utf_8
b70729b3bb312bf9150cb6078adb26e3
classdef rip methods(Static) function [ delta] = estimate_delta( Phi, KMax ) %ESTIMATERIPDELTA Estimates delta for the sensing matrix Phi [M, N] = size(Phi); if nargin == 1 KMax = N; end % the value of K for this test K = 0; delta = zeros(KMax, 2); tic; while K < KMax ...
github
indigits/sparse-plex-master
PartialDCT.m
.m
sparse-plex-master/library/+spx/+dict/PartialDCT.m
1,438
utf_8
fa3e56ee4e3fc0750cfb4a4492a732cd
classdef PartialDCT < spx.dict.Operator properties(SetAccess=private) % Dimensions row_pics col_perm num_rows num_cols end methods function self = PartialDCT(row_pics, col_perm) if nargin < 2 error('Row selection and column permutation must be specified'); end self.row_pics =...
github
indigits/sparse-plex-master
PartialDFT.m
.m
sparse-plex-master/library/+spx/+dict/PartialDFT.m
1,482
utf_8
7e1224d9fd5205b0db9b3b267317354f
classdef PartialDFT < spx.dict.Operator properties(SetAccess=private) % Dimensions row_pics col_perm num_rows num_cols end methods function self = PartialDFT(row_pics, col_perm) if nargin < 2 error('Row selection and column permutation must be specified'); end self.row_pics =...
github
indigits/sparse-plex-master
DCTBasis.m
.m
sparse-plex-master/library/+spx/+dict/DCTBasis.m
904
utf_8
1e1aee7144a487308122611047ee8faa
classdef DCTBasis < spx.dict.Operator properties(SetAccess=private) % Dimensions N end methods function self = DCTBasis(N) if nargin < 1 error('Basis dimensions must be specified'); end self.N = N; end function [mm, nn] = get_size(self) mm = self.N; nn = self.N; end function r...
github
indigits/sparse-plex-master
Matrix.m
.m
sparse-plex-master/library/+spx/+io/+latex/Matrix.m
2,392
utf_8
fd551d19fec613af70d3697f2f9c861d
classdef Matrix < handle properties hide_zeros = true show_nonzero_as_x = false end properties(SetAccess=private) % The matrix to be printed A % colors for individual cells cell_colors % colors for individual rows row_colors % colors for individual columns col_colors end metho...
github
indigits/sparse-plex-master
test_prob.m
.m
sparse-plex-master/library/+spx/+prob/tests/test_prob.m
208
utf_8
1afa1c78756e32ae9b255980d0b680a0
function test_suite = test_prob initTestSuite; end function test_is_pmf x = [.1 .4 .3 .2]; verifyTrue(testCase, SPX_Prob.is_pmf(x)); x = [-.1 .6 .3 .2]; assertFalse(SPX_Prob.is_pmf(x)); end
github
indigits/sparse-plex-master
test_it.m
.m
sparse-plex-master/library/+spx/+prob/tests/test_it.m
186
utf_8
4e7b2ffcaf60c0a066d7795635c9892d
function test_suite = test_it initTestSuite; end function test_entropy data = [0 0 0 1 1 1 2 2 2 3 3 3]; h = SPX_IT.entropy(data); assertElementsAlmostEqual(h, 2.0); end
github
indigits/sparse-plex-master
dct.m
.m
sparse-plex-master/library/+spx/+dsp/dct.m
4,821
utf_8
7d06aab9f71ac414a01aef8afd6f4172
classdef dct % Functions related to discrete cosine transform % % % Influenced by: % - WaveLab methods(Static) function alpha = forward_2(x) % Forward transform for DCT type 2. options.length_constraint = @spx.dsp.dyadic_length_constraint; alpha = spx.dsp.apply_transform(x, @dct_2_impl...
github
indigits/sparse-plex-master
dtmf_detector.m
.m
sparse-plex-master/library/+spx/+dsp/dtmf_detector.m
2,936
utf_8
04aa818537d19c8f33b16597693fd245
function [symbols, starts, durations] = dtmf_detector(signal, fs) window_length = floor(fs * 50 / 1000); overlap_length = floor(window_length / 2); n_fft = 2^nextpow2(window_length); % compute the spectrogram [s, f, t] = spectrogram(signal,hamming(window_length),... overlap_length,n_fft, fs, 'yaxis',... 'MinTh...
github
indigits/sparse-plex-master
dst.m
.m
sparse-plex-master/library/+spx/+dsp/dst.m
2,639
utf_8
58e84de801027a18db880a6ade91765c
classdef dst % Functions related to discrete sine transform % % Remarks: % % % Influenced by: % - WaveLab methods(Static) function alpha = forward_1(x) % Forward transform for DST type 1. options.length_constraint = @spx.dsp.dyadic_minus_one_length_constraint; alpha = spx.dsp.apply_t...
github
indigits/sparse-plex-master
make.m
.m
sparse-plex-master/library/+spx/+fast/private/make.m
7,477
utf_8
e4a378338c63925492fad1ccb6d2b1c0
function make(arg1) options.clean = false; options.filepath = []; if nargin >= 1 if endsWith(arg1, '.cpp') | endsWith(arg1, '.c') options.filepath = arg1; end if strcmp(arg1, 'clean') options.clean = true; end end compstr = computer; is64bit = strcmp(compstr(end-1:end),'64'); % compi...
github
indigits/sparse-plex-master
synthetic.m
.m
sparse-plex-master/library/+spx/+ecg/synthetic.m
617
utf_8
3a00ffd0c4277afd9f5ce26a22fae64f
classdef synthetic methods(Static) function x = simple(L) a0 = [0, 1, 40, 1, 0, -34, 118, -99, 0, 2, 21, 2, 0, 0, 0]; d0 = [0, 27, 59, 91, 131, 141, 163, 185, 195, 275, 307, 339, 357, 390, 440]; a = a0 / max(a0); d = round(d0 * L / d0(15)); d(15) = L; for i = 1:14 m = d(i) : d(i+1) - 1; slope ...
github
indigits/sparse-plex-master
runalltests.m
.m
sparse-plex-master/library/tests/runalltests.m
481
utf_8
178adf221c2fdc074a6b81a3c974b893
function runalltests(all) if nargin < 1 all = false; else end import matlab.unittest.TestSuite; import matlab.unittest.selectors.HasTag; suite = TestSuite.fromFolder(pwd, 'IncludingSubfolders', true); untagged_tests = suite.selectIf(~HasTag); tagged_tests = suite.selectIf(H...
github
indigits/sparse-plex-master
test_ssp.m
.m
sparse-plex-master/library/tests/ssp/test_ssp.m
925
utf_8
9ec28dba3886c7d188a7e3f13a3c5b87
function tests = test_ssp tests = functiontests(localfunctions); end function test_autocorr(testCase) x = [1 2 3]; r1 = xcorr(x); r2 = spx.ssp.auto_correlation(x); verifyEqual(testCase, r1, r2, 'AbsTol', 1e-12); for i=1:100 x = randn(1000, 1); r1 = xcorr(x); r2 = spx.s...
github
indigits/sparse-plex-master
test_cluster_comparison.m
.m
sparse-plex-master/library/tests/clustering/test_cluster_comparison.m
2,475
utf_8
c8bd6b3c764558cf5d55954b6fc81920
function tests = test_cluster_comparison tests = functiontests(localfunctions); end function test_complete_match_1(testCase) a = [1 1 1 2 2 2]; b = [2 2 2 1 1 1]; comparer = spx.cluster.ClusterComparison(a, b); result = comparer.fMeasure(); verifyEqual(testCase, result.fMeasure, 1.0); verify...
github
indigits/sparse-plex-master
test_similarity.m
.m
sparse-plex-master/library/tests/clustering/test_similarity.m
840
utf_8
6bfb44f67a66e58ffb997d9e38636d3a
function tests = test_similarity tests = functiontests(localfunctions); end function test_k_nearest(testCase) m = [1.0000 0.6000 0.2000 0.6000 1.0000 0.3000 0.2000 0.3000 1.0000]; m = spx.cluster.similarity.filter_k_nearest_neighbors(m, 2); verifyEqual(testCase, m, [ 1.0000 ...
github
indigits/sparse-plex-master
test_subspaces.m
.m
sparse-plex-master/library/tests/clustering/test_subspaces.m
2,542
utf_8
881aa390c7676bfe0074e182ebe75a8f
function tests = test_subspaces() tests = functiontests(localfunctions); end function test_affinity(testCase) N = 4; theta = pi/4; [A, B] = spx.data.synthetic.subspaces.two_spaces_at_angle(N, theta); verifyTrue(testCase, spx.matrix.is_orthonormal(A)); verifyTrue(testCase, spx.matrix.is_orthonorma...
github
indigits/sparse-plex-master
test_kmeans_pp.m
.m
sparse-plex-master/library/tests/clustering/test_kmeans_pp.m
552
utf_8
8731c6560b258490c935c89ff4b8b5a6
function tests = test_kmeans_pp tests = functiontests(localfunctions); end function test_1(testCase) X = [1 2 7 8 20 21 1 2 7 8 20 21]; % Capture current random number generator state st = rng; % Go to default state rng('default'); % Perform testing [seeds, labels] = spx.clust...
github
indigits/sparse-plex-master
test_hungarian.m
.m
sparse-plex-master/library/tests/clustering/assignment/test_hungarian.m
2,177
utf_8
3ac80febe3de46fb181d15a671d782d9
function tests = test_hungarian tests = functiontests(localfunctions); end function test_7x7(testCase) A = [88 7 10 53 5 30 56 75 69 80 70 53 81 57 88 73 87 89 64 5 84 18 98 1 14 25 5 29 19 8 71 96 36 19 54 94 88 7 87 17 36 24 ...
github
indigits/sparse-plex-master
test_spectral_cluster.m
.m
sparse-plex-master/library/tests/clustering/spectral/test_spectral_cluster.m
3,871
utf_8
e574ab61dd424ef6cdebc18fdbd189b7
function tests = test_spectral_cluster tests = functiontests(localfunctions); end function test_gaussian_values(testCase) points_per_set = 100; % number of clusters num_clusters = 8; % points points = []; gap = 2; true_labels = zeros(points_per_set*num_clusters, 1); fprintf('Creating...
github
indigits/sparse-plex-master
test_simple_spectral_cluster.m
.m
sparse-plex-master/library/tests/clustering/spectral/test_simple_spectral_cluster.m
1,329
utf_8
93edd7392db86d3170f988ae1fedeb5d
function tests = test_spectral_cluster tests = functiontests(localfunctions); end function problem = problem1() problem.W = [ones(4) zeros(4); zeros(4) ones(4)]; problem.num_clusters = 2; problem.labels = [1 1 1 1 2 2 2 2]; end function verify_problem(testCase, problem, result) verifyEqual(testCase,...
github
indigits/sparse-plex-master
test_ssc.m
.m
sparse-plex-master/library/tests/clustering/ssc/test_ssc.m
1,559
utf_8
62a94a7c38d22daadc2f6187669ee829
% Tests sparse subspace clustering algorithm classdef (TestTags = {'Long'}) test_ssc < matlab.unittest.TestCase methods (Test) function test_1(testCase) % dimension of ambient space n = 30; % number of subspaces = number of clusters ns = 2; % dimensions of individual subspaces 1 and 2 d1 = 1...
github
indigits/sparse-plex-master
test_dct.m
.m
sparse-plex-master/library/tests/dsp/test_dct.m
1,630
utf_8
4241b0c5464aadac77be067725b5b669
function tests = test_dct tests = functiontests(localfunctions); end function test_dct_2_3(testCase) n = 256; for i=randperm(n, 40) x = spx.vector.unit_vector(n, i); alpha = spx.dsp.dct.forward_2(x); tolerance = 0.0001; verifyEqual(testCase, norm(x), norm(alpha), 'AbsTol', tol...
github
indigits/sparse-plex-master
test_dst.m
.m
sparse-plex-master/library/tests/dsp/test_dst.m
1,012
utf_8
b12942f723d2fea40edae3d3cfdfbd2b
function tests = test_dst tests = functiontests(localfunctions); end function test_dst_1(testCase) x = cos((1:15) * .1); alpha = spx.dsp.dst.forward_1(x); y = spx.dsp.dst.inverse_1(alpha); tolerance = 1e-6; verifyEqual(testCase, x, y, 'AbsTol', tolerance); end function test_dst_2(testCase) ...
github
indigits/sparse-plex-master
test_statistics.m
.m
sparse-plex-master/library/tests/stats/test_statistics.m
225
utf_8
e6e0657f472d6c459894e1a309ff40f4
function tests = test_statistics tests = functiontests(localfunctions); end function test_mean(testCase) x = 1:100; xm = spx.stats.compute_statistic_per_vector(x, 1, @mean); verifyEqual(testCase, xm', x); end
github
indigits/sparse-plex-master
test_io.m
.m
sparse-plex-master/library/tests/io/test_io.m
1,099
utf_8
666caec846afe7a793960ee11f7652f2
function tests = test_io tests = functiontests(localfunctions); end function test_bytes2str(testCase) import spx.io; verifyEqual (testCase, io.bytes2str(10), '10 Bytes'); verifyEqual (testCase, io.bytes2str(1024), '1.00 KB'); verifyEqual (testCase, io.bytes2str(1024*1024), '1.00 MB'); verifyEqual...
github
indigits/sparse-plex-master
test_omp_chol.m
.m
sparse-plex-master/library/tests/pursuit/single/test_omp_chol.m
939
utf_8
d5277dd9a7e6b87f2c7998bbcd7bd7cf
function tests = test_omp_chol tests = functiontests(localfunctions); end function [A, x, b, k] = problem_1() m = 100; n = 1000; k = 4; A = spx.dict.simple.gaussian_dict(m, n); gen = spx.data.synthetic.SparseSignalGenerator(n, k); % create a sparse vector x = gen.biGaussian(); b = A...
github
indigits/sparse-plex-master
test_omp.m
.m
sparse-plex-master/library/tests/pursuit/single/test_omp.m
2,329
utf_8
74f615b4d58a91dd58ca8326ac15687a
function tests = test_omp tests = functiontests(localfunctions); end function [A, x, b, k] = problem_1() m = 100; n = 1000; k = 4; A = spx.dict.simple.gaussian_dict(m, n); gen = spx.data.synthetic.SparseSignalGenerator(n, k); % create a sparse vector x = gen.biGaussian(); b = A*x; e...
github
indigits/sparse-plex-master
test_cosamp.m
.m
sparse-plex-master/library/tests/pursuit/single/test_cosamp.m
1,437
utf_8
ac710139fd1c50333cb9d69750f2eb18
function tests = test_cosamp tests = functiontests(localfunctions); end function [A, x, b, k] = problem_1() m = 100; n = 1000; k = 4; A = spx.dict.simple.gaussian_dict(m, n); gen = spx.data.synthetic.SparseSignalGenerator(n, k); % create a sparse vector x = gen.biGaussian(); b = A*x...
github
indigits/sparse-plex-master
test_mp.m
.m
sparse-plex-master/library/tests/pursuit/single/test_mp.m
1,443
utf_8
fa16972408abc662a5ffab6ab46d801b
function tests = test_mp tests = functiontests(localfunctions); end function [A, x, b, k] = problem_1() m = 100; n = 1000; k = 4; A = spx.dict.simple.gaussian_dict(m, n); gen = spx.data.synthetic.SparseSignalGenerator(n, k); % create a sparse vector x = gen.biGaussian(); b = A*x; en...
github
indigits/sparse-plex-master
test_l1_recovery.m
.m
sparse-plex-master/library/tests/pursuit/single/long/test_l1_recovery.m
3,280
utf_8
357fa436d695b4dda025e3d48dfcdb65
function test_suite = test_l1_recovery initTestSuite; end function [A, x, b] = problem_1() m = 100; n = 1000; k = 4; A = normrnd(0, 1/sqrt(m), m, n); % create a sparse vector x = zeros(n, 1); indices = randperm(n, k); x(indices) = normrnd(0, 1, k, 1); b = A*x; end function [A, X...
github
indigits/sparse-plex-master
test_dictionary_comparison.m
.m
sparse-plex-master/library/tests/dict/test_dictionary_comparison.m
568
utf_8
1f0477dc2aa24e1d194be5253a1ce56f
function tests = test_dictionary_comparison tests = functiontests(localfunctions); end function test_1(testCase) d = spx.dict.simple.dirac_fourier_mtx(16); ratio = spx.dict.comparison.matching_atoms_ratio(d, d); verifyEqual(testCase, ratio, 1); % Let's mess up with one of the atoms d2 = d; d...
github
indigits/sparse-plex-master
test_dictionaries.m
.m
sparse-plex-master/library/tests/dict/test_dictionaries.m
925
utf_8
d6e7d3d1ad1526fc52d1c7b829b3cb38
function tests = test_dictionaries tests = functiontests(localfunctions); end function test_gaussian(testCase) D = 10; N = 4; Dict = spx.dict.simple.gaussian_dict(N, D); verifyTrue(testCase, isa(Dict, 'spx.dict.MatrixOperator')); verifyTrue(testCase, isa(Dict, 'spx.dict.Operator')); % Check s...
github
indigits/sparse-plex-master
test_operator.m
.m
sparse-plex-master/library/tests/dict/test_operator.m
5,079
utf_8
f6530128d6b8fdd6d74736932651dc74
function tests = test_operator tests = functiontests(localfunctions); end function test_1(testCase) b = [ 1 2 3; 3 4 3]; bb = spx.dict.MatrixOperator(b); [m, n] = size(bb); verifyEqual(testCase, [m, n], size(b)); bbb = double(bb); verifyEqual(testCase, bbb, b); v = [1 2 3]'; verifyEqu...
github
indigits/sparse-plex-master
test_lang.m
.m
sparse-plex-master/library/tests/commons/test_lang.m
242
utf_8
2e9b93471be05dbc6b2dc9c5ebae696f
function tests = test_lang tests = functiontests(localfunctions); end function test_1(testCase) verifyTrue(testCase, spx.lang.is_class('spx.lang')); verifyFalse(testCase, spx.lang.is_class('spx.lang.noop')); spx.lang.noop; end
github
indigits/sparse-plex-master
test_spx_norms.m
.m
sparse-plex-master/library/tests/commons/test_spx_norms.m
1,690
utf_8
3ffcc39c4b15fba2358b7faa1f47def9
function tests = test_spx_norms tests = functiontests(localfunctions); end function test_lp_norms(testCase) x = [1 1 1 2 2 2 3 3 3]; verifyEqual(testCase, [6 6 6], spx.norm.norms_l1_cw(x)); verifyEqual(testCase, [3 6 9]', spx.norm.norms_l1_rw(x)); verifyEqual(testCase, sqrt([14 14...
github
indigits/sparse-plex-master
test_spx_checks.m
.m
sparse-plex-master/library/tests/commons/test_spx_checks.m
1,429
utf_8
4bdb7de87334e2ce50bcd534b60a8df5
function tests = test_spx_checks tests = functiontests(localfunctions); end function setupOnce(testCase) import spx.matrix; end function test_is_square(testCase) import spx.matrix; a = randn(3, 4); verifyFalse(testCase, matrix.is_square(a)); verifyTrue(testCase, matrix.is_square(zeros(3, 3))); ...
github
indigits/sparse-plex-master
test_spx_vector.m
.m
sparse-plex-master/library/tests/commons/test_spx_vector.m
3,485
utf_8
d2ac3d3005cb569f8035fe409b99cda3
function tests = test_spx_vector tests = functiontests(localfunctions); end function test_reverse(testCase) v1 = [1 2 3]; v2 = [3 2 1]; verifyEqual(testCase, v1, spx.vector.reverse(v2)); end function test_reshape_as_row(testCase) x = [1 2 3]; y = spx.vector.reshape_as_row_vec(x); verifyEqua...
github
indigits/sparse-plex-master
test_signals.m
.m
sparse-plex-master/library/tests/commons/test_signals.m
542
utf_8
fa5b7f2c160a8270d75e563ae3da44ae
function tests = test_signals tests = functiontests(localfunctions); end function test_picket_fence(testCase) import spx.data.synthetic.picket_fence; import spx.commons.sparse.support; s = picket_fence(16); expected_s = [ 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 ]; verifyEqual(testCase, s, s); fs = f...
github
indigits/sparse-plex-master
test_basic_noise.m
.m
sparse-plex-master/library/tests/data/test_basic_noise.m
316
utf_8
0f63da46dffad64238d8260e7ae6e554
function tests = test_basic_noise tests = functiontests(localfunctions); end function test1(testCase) N = 100; S = 100; gen = spx.data.noise.Basic(N, S); sigma = 1; X = gen.gaussian(sigma); variance = sum(sum(X.^2)) / (N * S); verifyEqual(testCase, sigma, variance, 'RelTol', .1); end
github
indigits/sparse-plex-master
test_standard_images.m
.m
sparse-plex-master/library/tests/data/test_standard_images.m
592
utf_8
365084969dc9b7569540da8b641d249a
function tests = test_standard_images tests = functiontests(localfunctions); end function setupOnce(testCase) figure; end function teardownOnce(testCase) close; end function test_barbara(testCase) image = spx.data.standard_images.barbara_gray_512x512(); imshow(uint8(image)); pause(.1); end func...
github
indigits/sparse-plex-master
test_yale_faces.m
.m
sparse-plex-master/library/tests/data/image/test_yale_faces.m
983
utf_8
b995e2d5cb1d27022ca1963456e4f4bd
function tests = test_yale_faces tests = functiontests(localfunctions); end function setupOnce(testCase) close all; end function teardownOnce(testCase) close all; end function test_basic(testCase) yf = spx.data.image.YaleFaces(); yf.load(); verifyEqual(testCase, yf.ImageHeight, 192); verify...
github
indigits/sparse-plex-master
test_ehsan_yale_faces.m
.m
sparse-plex-master/library/tests/data/image/test_ehsan_yale_faces.m
785
utf_8
5de138b05d688c8188e8803739f3ea5f
function tests = test_ehsan_yale_faces tests = functiontests(localfunctions); end function setupOnce(testCase) close all; end function teardownOnce(testCase) close all; end function test_basic(testCase) yf = spx.data.image.EhsanYaleFaces(); verifyEqual(testCase, yf.image_height, 48); verifyEqua...
github
indigits/sparse-plex-master
test_sparse_sig_gen.m
.m
sparse-plex-master/library/tests/data/synthetic/test_sparse_sig_gen.m
1,198
utf_8
eab0e496609576d4fd8faf7bf47c156f
function tests = test_sparse_sig_gen tests = functiontests(localfunctions); end function test_uniform(testCase) N = 10; K = 4; S = 1; gen = spx.data.synthetic.SparseSignalGenerator(N, K, S); a = 1; b = 2; result = gen.uniform(a, b); omega = gen.Omega; nz_part = result(omega); ...
github
indigits/sparse-plex-master
test_dict_learn.m
.m
sparse-plex-master/library/tests/data/synthetic/test_dict_learn.m
364
utf_8
475f9de46a6e3ac39838943ee94d7620
function tests = test_dict_learn tests = functiontests(localfunctions); end function setupOnce(testCase) figure; end function teardownOnce(testCase) close; end function test1(testCase) import spx.data.synthetic.dict_learn_problems; problem = dict_learn_problems.problem_random_dict(); imagesc(pr...
github
indigits/sparse-plex-master
test_chol.m
.m
sparse-plex-master/library/tests/la/test_chol.m
753
utf_8
3660edd7800e4243ecfebc8e4e283efb
function tests = test_spaces tests = functiontests(localfunctions); end function test_chol_update1(testCase) n = 5; A = gallery('moler', n); L = sqrt(A(1,1)); for c = 2:n % pick c elements from c-th column atom = A(1:c, c); L = spx.la.chol.chol_update(L, atom); estima...
github
indigits/sparse-plex-master
test_spaces.m
.m
sparse-plex-master/library/tests/la/test_spaces.m
2,638
utf_8
a0517ee1a40ad05aad1c232975ffca47
function tests = test_spaces tests = functiontests(localfunctions); end function test_orth_complement(testCase) M = 100; N1 = 10; N2 = 10; N = N1 + N2; X = randn(M, N) ./ sqrt(M); A = X(:, 1:N1); B = X(:, N1+1:end); C = spx.la.spaces.orth_complement(A, B); D = A' * C; verifyE...
github
indigits/sparse-plex-master
test_svd.m
.m
sparse-plex-master/library/tests/la/test_svd.m
937
utf_8
88b5e9f662519ffd25daa9d0a67a498c
function tests = test_svd tests = functiontests(localfunctions); end function test_mahdi_rank(testCase) s = [ 1 1 1 1 0 0]; [r, g] = spx.la.svd.mahdi_rank(s); verifyEqual(testCase, r, 4); verifyEqual(testCase, g, 1); s = [ 1 .9 .8 .7 .3 .2 .1]; [r, g] = spx.la.svd.mahdi_rank(s); ver...
github
indigits/sparse-plex-master
test_householder.m
.m
sparse-plex-master/library/tests/la/test_householder.m
1,009
utf_8
e0b033e03727f0917fd662631f5b59cb
function tests = test_householder tests = functiontests(localfunctions); end function [v, beta, y] = verify_house(x, testCase) [v , beta] = spx.la.house.gen(x); y = spx.la.house.premul(x, v, beta); verifyEqual(testCase, norm(y), norm(x), 'AbsTol', 1e-12); verifyEqual(testCase, y(2:3), zeros(2,1), 'Ab...
github
indigits/sparse-plex-master
test_lansvd.m
.m
sparse-plex-master/library/tests/la/svd/test_lansvd.m
3,422
utf_8
f205a455e5ac4ed6621aaed22d36846f
function tests = test_lansvd tests = functiontests(localfunctions); end function A = mat_simple1_1(n) m = 200; if nargin < 1 n = 50; end U0 = orth(randn(m)); V0 = orth(randn(n)); S0 = zeros(m, n); for i=1:n S0(i,i) = m / (i); end A = U0*S0*V0'; end function verify...
github
indigits/sparse-plex-master
test_bdhizsqr.m
.m
sparse-plex-master/library/tests/la/svd/test_bdhizsqr.m
4,147
utf_8
c62b10c9302f39aac4e0c803db68ed15
function tests = test_bdhizsqr tests = functiontests(localfunctions); end function verify_bd_full_svd(a, b, testCase) n = numel(a); A = full(spdiags([a [0; b]], [0 1], n, n)); [UU, SS, VV] = svd(A); options.verbosity = 0; [U, S, V] = spx.fast.bdhizsqr_svd(a,b, options); verifyEqual(testCase,...
github
indigits/sparse-plex-master
test_batch_omp.m
.m
sparse-plex-master/library/tests/fast/test_batch_omp.m
1,029
utf_8
b4e735182291b81a6dcd873ef0981823
function tests = test_batch_omp tests = functiontests(localfunctions); end function [dict, reps, signals, k] = problem_2() m = 200; n = 1000; k = 10; s = 500; dict = spx.dict.simple.gaussian_dict(m, n); gen = spx.data.synthetic.SparseSignalGenerator(n, k, s); % create a sparse vector ...
github
indigits/sparse-plex-master
test_batch_omp_spr.m
.m
sparse-plex-master/library/tests/fast/test_batch_omp_spr.m
1,799
utf_8
b3812e86b3989cbec10328dfc0723b9b
function tests = test_batch_omp_spr tests = functiontests(localfunctions); end function test_batch_omp_spr_1(testCase) % dimension of ambient space n = 50; % number of subspaces = number of clusters ns = 2; % dimensions of individual subspaces 1 and 2 d1 = 3; d2 = 3; % number of si...
github
indigits/sparse-plex-master
test_fast_omp_chol.m
.m
sparse-plex-master/library/tests/fast/test_fast_omp_chol.m
1,214
utf_8
b696e183d89a36a26fdfc4681978a709
function tests = test_fast_omp_chol tests = functiontests(localfunctions); end function [A, x, b, k] = problem_1() m = 100; n = 1000; k = 4; A = spx.dict.simple.gaussian_dict(m, n); gen = spx.data.synthetic.SparseSignalGenerator(n, k); % create a sparse vector x = gen.biGaussian(); ...
github
indigits/sparse-plex-master
test_beylkin.m
.m
sparse-plex-master/library/tests/wavelet/test_beylkin.m
215
utf_8
25755340b18ab6d8fae018352ec6ddf7
function tests = test_beylkin tests = functiontests(localfunctions); end function test_qmf(testCase) f = spx.wavelet.baylkin.quad_mirror_filter(); verifyTrue(testCase, spx.norm.is_unit_norm_vec(f)); end
github
indigits/sparse-plex-master
test_symmlet.m
.m
sparse-plex-master/library/tests/wavelet/test_symmlet.m
838
utf_8
f2191ff433435e1cacd3a7d388e0d041
function tests = test_symmlet tests = functiontests(localfunctions); end function test_qmf(testCase) f = spx.wavelet.symm.quad_mirror_filter(4); verifyTrue(testCase, spx.norm.is_unit_norm_vec(f)); f = spx.wavelet.symm.quad_mirror_filter(5); verifyTrue(testCase, spx.norm.is_unit_norm_vec(f)); f = ...
github
indigits/sparse-plex-master
test_vaidyanathan.m
.m
sparse-plex-master/library/tests/wavelet/test_vaidyanathan.m
225
utf_8
ac4e3c8c785922c1b8acf6dbae17729e
function tests = test_vaidyanathan tests = functiontests(localfunctions); end function test_qmf(testCase) f = spx.wavelet.vaidyanathan.quad_mirror_filter(); verifyTrue(testCase, spx.norm.is_unit_norm_vec(f)); end
github
indigits/sparse-plex-master
test_wl_transform.m
.m
sparse-plex-master/library/tests/wavelet/test_wl_transform.m
2,161
utf_8
0d4ecb6fb355d4f4f00b1efb4e7f25b4
function tests = test_wl_transform tests = functiontests(localfunctions); end function test_fwd_po_wavelet_transform(testCase) x = [0 5 -3 3 -4 -6 -1 6 1 -7 -2 -7 1 -8 1 -3]; h = spx.wavelet.daubechies.quad_mirror_filter(20); L = 1; w = spx.wavelet.transform.forward_periodized_orthogonal(h, x, L); ...
github
indigits/sparse-plex-master
test_daubechies.m
.m
sparse-plex-master/library/tests/wavelet/test_daubechies.m
1,052
utf_8
eb350114088d78d235d7a1ea1eaeca5b
function tests = test_daubechies tests = functiontests(localfunctions); end function test_qmf(testCase) f = spx.wavelet.daubechies.quad_mirror_filter(4); verifyTrue(testCase, spx.norm.is_unit_norm_vec(f)); f = spx.wavelet.daubechies.quad_mirror_filter(6); verifyTrue(testCase, spx.norm.is_unit_norm_ve...
github
indigits/sparse-plex-master
test_wavelet.m
.m
sparse-plex-master/library/tests/wavelet/test_wavelet.m
6,029
utf_8
4af5d2b82efd06ff363c6a99675f7e40
function tests = test_wavelet tests = functiontests(localfunctions); end function test_dyad(testCase) verifyEqual(testCase, spx.wavelet.dyad(0) , 2:2); verifyEqual(testCase, spx.wavelet.dyad(1) , 3:4); verifyEqual(testCase, spx.wavelet.dyad(2) , 5:8); verifyEqual(testCase, spx.wavelet.dyad(3) , 9:16)...
github
indigits/sparse-plex-master
test_haar.m
.m
sparse-plex-master/library/tests/wavelet/test_haar.m
209
utf_8
95bba51b83208a69a9492f1d9e0105c1
function tests = test_haar tests = functiontests(localfunctions); end function test_qmf(testCase) f = spx.wavelet.haar.quad_mirror_filter(); verifyTrue(testCase, spx.norm.is_unit_norm_vec(f)); end
github
indigits/sparse-plex-master
test_lcs_base.m
.m
sparse-plex-master/library/tests/wavelet/test_lcs_base.m
898
utf_8
3cc938348d18a8aab3ae195924c51ab2
function tests = test_lcs_base tests = functiontests(localfunctions); end function test_psi(testCase) x = -0.5:.01:.5; epsilon = .1; psi_a = spx.wavelet.lcs.psi(epsilon, x); psi_b = spx.wavelet.lcs.psi(epsilon, -x); verifyEqual(testCase, psi_a, psi_b, 'RelTol', 0.01); end function test_theta(tes...
github
indigits/sparse-plex-master
test_coiflet.m
.m
sparse-plex-master/library/tests/wavelet/test_coiflet.m
644
utf_8
aaac1aa41673d8b9572a77c41a7ee948
function tests = test_coiflet tests = functiontests(localfunctions); end function test_qmf(testCase) f = spx.wavelet.coiflet.quad_mirror_filter(1); verifyTrue(testCase, spx.norm.is_unit_norm_vec(f)); f = spx.wavelet.coiflet.quad_mirror_filter(2); verifyTrue(testCase, spx.norm.is_unit_norm_vec(f)); ...
github
indigits/sparse-plex-master
ar_omp.m
.m
sparse-plex-master/experiments/atom_ranking_in_greedy_pursuit/ar_omp.m
3,836
utf_8
9ae5b4cc1a812ec9faae2eef2888a7be
function result = ar_omp(Phi, K, y, matching_mode, options) % dimensions [n, d] = size(Phi); % active indices omega = []; % residual r = y; % residual norm r_norm = norm(r); % result z = zeros(d, 1); atom_index_sum = 0; matched_atoms = 0; selected_atoms = 1:d; if nargin == 3 matching_mode = 4; end if nargin < 5 ...
github
indigits/sparse-plex-master
atom_ranked_omp.m
.m
sparse-plex-master/experiments/atom_ranking_in_greedy_pursuit/atom_ranked_omp.m
2,412
utf_8
2cb2258e2eca8fc7bc676ff842c0aef6
function result = atom_ranked_omp(Phi, y, K, atoms_to_match, matching_mode) % dimensions [n, d] = size(Phi); % active indices omega = []; % residual r = y; % residual norm r_norm = norm(r); % result z = zeros(d, 1); atom_index_sum = 0; selected_atoms = 1:d; if nargin == 3 atoms_to_match = n; end if nargin < 5 m...
github
krystophny/matclipse-master
output_xml.m
.m
matclipse-master/org.eclipselabs.matclipse.mconsole/m-files/output_xml.m
28,832
utf_8
d04c088f646c959a1cbf45e2df1f1a6c
function str=output_xml(data,orient,fid,vname,xml,init,varargin) % % produces xml output of matlab variable data % % usage to write files: % output_xml(data,orient,fid,vname,xml) % output_xml(data) - simplest version, output to screen % output_xml(data,[],[],1) - output to screen, only link to data % % usage fo...