필터 지우기
필터 지우기

Generate Sparsity basis matrix

조회 수: 3 (최근 30일)
karem adam
karem adam 2019년 1월 7일
In this demo :
function [xx, Psi, al] = GenSyn(n,k,nist,mode,Psi)
The Mandatory arguments are :
% n = signal dimensionality
% k = sparsity level % nist = amount of generated instances
and the Outputs are :
% xx = matrix containing the generated instances
% Psi = corresponding sparsity basis
% al = matrix containing the sparse representation of xx
% Written by Mauro Mangia and Riccardo Rovatti.
clc;
clear ;
close all;
cdir = pwd;
if strcmp(cdir(end-3:end),'demo')
cd ..
addpath(genpath(pwd))
cd demo
end
GetSNRdB = @(Data, DataX) 20*log10(norm(Data)/norm(Data-DataX));
opts = spgSetParms('verbosity',0); % Turn off the SPGL1 log output
verbosity=2; %Turn on the BRak log output
%% setting
n=384;
k=5;
mode='LP'; %(LP for low-pass profile and BP for band-pass profile)
%% correlation matrix and dataset for the considered setting
% input signals
nw=3; %amount of signal instances used as dataset
[sig, F]=GenSyn(n,k,nw,mode);
%% TESTs
RND = zeros(size(sig));
for is = 1:nw
x=sig(:,is);
%% standard CS-Antipodal
% sensing matrix
phi = ceil(rand(M,n)-1+p);
%measurement vector
y=phi*x;
%signal reconstruction
RND(:,is) = F*spgl1(phi*F, y,0,1e-5,[],opts);
end
I already have a sparse signal, I do not need to generate one. What I need is just to know how to find the matrix psi, which is the corresponding sparsity basis, using Matlab?

답변 (0개)

카테고리

Help CenterFile Exchange에서 Correlation and Convolution에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by