⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 example_matrix.m

📁 Sparse Estimation Algorithms by Blumensath and Davies min ||x||_0 subject to ||y - Ax||_2<e
💻 M
字号:
% Example using operator specified as function%% Copyright (c) 2007 Thomas Blumensath%% The University of Edinburgh% Email: thomas.blumensath@ed.ac.uk% Comments and bug reports welcome%% This file is part of sparsity Version 0.1% Created: April 2007%% Part of this toolbox was developed with the support of EPSRC Grant% D000246/1%% Please read COPYRIGHT.m for terms and conditions.% Problem formulationn=1024; % Sparse domain dimensionm=256;  % observation domain dimensionk=50;   % 50 Non-zero elements% Make an indicator vector to select FFT su-bmatrixRANP=randperm(n);FFT_subset=zeros(n,1);FFT_subset(RANP(1:m))=1;% Define functionsP = randn(m,n);% Normalisefor i=1:n    P(:,i)=P(:,i)/norm(P(:,i));end% Generate sparse signals=zeros(n,1);RANP=randperm(n);s(RANP(1:k))=randn(k,1);x=MyOp ( s );% Use any of the algorithms provideds_approx = greed_omp(MyOp,x,n,'stopTol',k);% See how we have donefigure(1)subplot(2,1,1)stem(s,'k')subplot(2,1,2)stem(s_approx,'k')

⌨️ 快捷键说明

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