l1eq_example.m

来自「基于内点法的解l2_l1和l2_TV优化问题的matlab代码」· M 代码 · 共 58 行

M
58
字号
% l1eq_example.m%% Test out l1eq code (l1 minimization with equality constraints).%% Written by: Justin Romberg, Caltech% Email: jrom@acm.caltech.edu% Created: October 2005%% put key subdirectories in path if not already therepath(path, './Optimization');path(path, './Data');% load random states for repeatable experimentsload RandomStatesrand('state', rand_state);randn('state', randn_state);% signal lengthN = 8192;% number of spikes in the signalT = 100;% number of observations to makeK = 1024;% random +/- 1 signalx = zeros(N,1);q = randperm(N);x(q(1:T)) = sign(randn(T,1));% measurement matrixdisp('Creating measurment matrix...');A = randn(K,N);A = orth(A')';disp('Done.');	% observationsy = A*x;% initial guess = min energyx0 = A'*y;% solve the LPticxp = l1eq_pd(x0, A, [], y, 1e-3);toc% large scale% Afun = @(z) A*z;% Atfun = @(z) A'*z;% tic% xp = l1eq_pd(x0, Afun, Atfun, y, 1e-3, 30, 1e-8, 200);% toc

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?