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

📄 example_object.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 formulationm=1024; % Sparse domain dimensionn=256;  % observation domain dimensionk=50;   % 50 Non-zero elements% Make an indicator vector to select FFT sub-matrixrp                  = randperm(m/2);SubSet              = zeros(m/2,1);SubSet(rp(1:n/2))   = 1;SubSet              = logical(SubSet);% Create objectMyOb = MyObjectName(SubSet);% Generate sparse signals=zeros(m,1);RANP=randperm(m);s(RANP(1:k))=randn(k,1);x=MyOb*s;% Use any of the algorithms provided[s_est, err_mse, iter_time]  = greed_gp(x,MyOb,m,'stopTol',k);% See how we have done figure(1)subplot(4,1,1)stem(s,'k')title('original')subplot(4,1,2)stem(s_est,'k')title('estimate')sig_ms=x'*x/n;figure(1)subplot(4,1,3)stem(20*log10(sig_ms./err_mse),'k')title('SNR_x')subplot(4,1,4)stem(iter_time,'k')title('time')

⌨️ 快捷键说明

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