1、随机高斯测量矩阵

function [ Phi ] = GaussMtx( M,N )
%GaussMtx Summary of this function goes here
% Generate Bernoulli matrix
% M -- RowNumber
% N -- ColumnNumber
% Phi -- The Gauss matrix %% Generate Gauss matrix
Phi = randn(M,N);
%Phi = Phi/sqrt(M);
end

2、随机贝努力测量矩阵

function [ Phi ] = BernoulliMtx( M,N )
%BernoulliMtx Summary of this function goes here
% Generate Bernoulli matrix
% M -- RowNumber
% N -- ColumnNumber
% Phi -- The Bernoulli matrix %% ()Generate Bernoulli matrix(The first kind)
% --P=0.5 ---P=0.5
Phi = randi([,],M,N);%If your MATLAB version is too low,please use randint instead
Phi(Phi==) = -;
%Phi = Phi/sqrt(M);
% %% ()Generate Bernoulli matrix(The second kind)
% % --P=/ ---P=/ --/
% Phi = randi([-,],M,N);%If your MATLAB version is too low,please use randint instead
% Phi(Phi==) = ;%P=/
% Phi(Phi==) = ;%P=/
% Phi(Phi==) = ;%P=/
% %Phi = Phi*sqrt(/M);
end

3、部分哈达玛测量矩阵

function [ Phi ] = PartHadamardMtx( M,N )
%PartHadamardMtx Summary of this function goes here
% Generate part Hadamard matrix
% M -- RowNumber
% N -- ColumnNumber
% Phi -- The part Hadamard matrix %% parameter initialization
%Because the MATLAB function hadamard handles only the cases where n, n/,
%or n/ is a power of
L_t = max(M,N);%Maybe L_t does not meet requirement of function hadamard
L_t1 = ( - mod(L_t,)) + L_t;
L_t2 = ( - mod(L_t,)) + L_t;
L_t3 = ^ceil(log2(L_t));
L = min([L_t1,L_t2,L_t3]);%Get the minimum L
%% Generate part Hadamard matrix
Phi = [];
Phi_t = hadamard(L);
RowIndex = randperm(L);
Phi_t_r = Phi_t(RowIndex(:M),:);
ColIndex = randperm(L);
Phi = Phi_t_r(:,ColIndex(:N));
end

4、部分傅里叶测量矩阵

function [ Phi ] = PartFourierMtx( M,N )
%PartFourierMtx Summary of this function goes here
% Generate part Fourier matrix
% M -- RowNumber
% N -- ColumnNumber
% Phi -- The part Fourier matrix %% Generate part Fourier matrix
Phi_t = fft(eye(N,N))/sqrt(N);%Fourier matrix
RowIndex = randperm(N);
Phi = Phi_t(RowIndex(:M),:);%Select M rows randomly
%normalization
for ii = :N
Phi(:,ii) = Phi(:,ii)/norm(Phi(:,ii));
end
end

5、稀疏随机测量矩阵

function [ Phi ] = SparseRandomMtx( M,N,d )
%SparseRandomMtx Summary of this function goes here
% Generate SparseRandom matrix
% M -- RowNumber
% N -- ColumnNumber
% d -- The number of '' in every column,d<M
% Phi -- The SparseRandom matrix %% Generate SparseRandom matrix
Phi = zeros(M,N);
for ii = :N
ColIdx = randperm(M);
Phi(ColIdx(:d),ii) = ;
end
end

6、托普利兹测量矩阵与循环测量矩阵

function [ Phi ] = ToeplitzMtx( M,N )
%ToeplitzMtx Summary of this function goes here
% Generate Toeplitz matrix
% M -- RowNumber
% N -- ColumnNumber
% Phi -- The Toeplitz matrix %% Generate a random vector
% %()Gauss
% u = randn(,*N-);
%()Bernoulli
u = randi([,],,*N-);
u(u==) = -;
%% Generate Toeplitz matrix
Phi_t = toeplitz(u(N:end),fliplr(u(:N)));
Phi = Phi_t(:M,:);
end
function [ Phi ] = CirculantMtx( M,N )
%CirculantMtx Summary of this function goes here
% Generate Circulant matrix
% M -- RowNumber
% N -- ColumnNumber
% Phi -- The Circulant matrix %% Generate a random vector
% %()Gauss
% u = randn(,N);
%()Bernoulli
u = randi([,],,N);
u(u==) = -;
%% Generate Circulant matrix
Phi_t = toeplitz(circshift(u,[,]),fliplr(u(:N)));
Phi = Phi_t(:M,:);
end

参考来源:http://blog.csdn.net/jbb0523/article/details/44700735

浅谈压缩感知(七):常见测量矩阵的MATLAB实现的更多相关文章

  1. 浅谈压缩感知(二十四):压缩感知重构算法之子空间追踪(SP)

    主要内容: SP的算法流程 SP的MATLAB实现 一维信号的实验与结果 测量数M与重构成功概率关系的实验与结果 SP与CoSaMP的性能比较 一.SP的算法流程 压缩采样匹配追踪(CoSaMP)与子 ...

  2. 浅谈压缩感知(二十一):压缩感知重构算法之正交匹配追踪(OMP)

    主要内容: OMP的算法流程 OMP的MATLAB实现 一维信号的实验与结果 测量数M与重构成功概率关系的实验与结果 稀疏度K与重构成功概率关系的实验与结果 一.OMP的算法流程 二.OMP的MATL ...

  3. 浅谈压缩感知(二十):OMP与压缩感知

    主要内容: OMP在稀疏分解与压缩感知中的异同 压缩感知通过OMP重构信号的唯一性 一.OMP在稀疏分解与压缩感知中的异同 .稀疏分解要解决的问题是在冗余字典(超完备字典)A中选出k列,用这k列的线性 ...

  4. 浅谈压缩感知(十六):感知矩阵之RIP

    在压缩感知中,总是看到"矩阵满足RIP"之类的字眼,没错,这是一个压缩感知绕不开的术语,有限等距性质(Restricted Isometry Property, RIP). 注意: ...

  5. 浅谈压缩感知(十五):感知矩阵之spark常数

    在压缩感知中,有一些用来评价感知矩阵(非测量矩阵)的指标,如常见的RIP等,除了RIP之外,spark常数也能够用来衡量能否成为合适的感知矩阵. 0.相关概念与符号 1.零空间条件NULL Space ...

  6. 浅谈压缩感知(十四):傅里叶矩阵与小波变换矩阵的MATLAB实现

    主要内容: 傅里叶矩阵及其MATLAB实现 小波变换矩阵及其MATLAB实现  傅里叶矩阵及其MATLAB实现 傅里叶矩阵的定义:(来源: http://mathworld.wolfram.com/F ...

  7. 浅谈压缩感知(二十八):压缩感知重构算法之广义正交匹配追踪(gOMP)

    主要内容: gOMP的算法流程 gOMP的MATLAB实现 一维信号的实验与结果 稀疏度K与重构成功概率关系的实验与结果 一.gOMP的算法流程 广义正交匹配追踪(Generalized OMP, g ...

  8. 浅谈压缩感知(二十六):压缩感知重构算法之分段弱正交匹配追踪(SWOMP)

    主要内容: SWOMP的算法流程 SWOMP的MATLAB实现 一维信号的实验与结果 门限参数a.测量数M与重构成功概率关系的实验与结果 SWOMP与StOMP性能比较 一.SWOMP的算法流程 分段 ...

  9. 浅谈压缩感知(二十五):压缩感知重构算法之分段正交匹配追踪(StOMP)

    主要内容: StOMP的算法流程 StOMP的MATLAB实现 一维信号的实验与结果 门限参数Ts.测量数M与重构成功概率关系的实验与结果 一.StOMP的算法流程 分段正交匹配追踪(Stagewis ...

随机推荐

  1. vs断点未能绑定

    原文链接:http://blog.csdn.net/pc0de/article/details/41790063 突然发现所有的c++项目在调试的时候加断点都会报错:”不能设置下面的断点.....断点 ...

  2. lodash用法系列(1),数组集合操作

    Lodash用来操作对象和集合,比Underscore拥有更多的功能和更好的性能. 官网:https://lodash.com/引用:<script src="//cdnjs.clou ...

  3. struct对象可能分配在托管堆上吗

    struct对象可能被分配在托管堆上吗? --会的. 比如当对struct装箱的时候,就会被分配在托管堆上. 比如,让一个struct实现一个接口. public interface IReport ...

  4. CCBAnimationManager

    #ifndef __CCB_CCBANIMATION_MANAGER_H__ #define __CCB_CCBANIMATION_MANAGER_H__ #include "cocos2d ...

  5. 使用 Crash 工具分析 Linux dump 文件

    转自:http://blog.csdn.net/commsea/article/details/11804897 简介: Linux 内核由于其复杂性,使得对内核出现的各种异常的追踪变得异常困难.本文 ...

  6. SharePoint 取消分享时的默认发邮件

    前言 最近遇到一个需求,就是sharepoint默认分享的时候,会默认勾选发送邮件的功能.而用户,经常会用到分享的功能,但是不需要发送邮件,需要默认不勾选这个操作. 这样,就需要修改sharepoin ...

  7. Java获取当前时间30天之前的时间

    //方法一 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); String maxDateStr = " ...

  8. Statistical Artifact (error)

    In natural science and signal processing, an artifact is any error in the perception or representati ...

  9. gunicorn结合django启动后台线程

    preload 为True的情况下,会将辅助线程或者进程开在master里,加重master的负担(master最好只是用来负责监听worker进程) django应用的gunicorn示例:只在主线 ...

  10. spring mvc 返回乱码SpringMVC使用@ResponseBody注解返回中文字符串乱码的问题

    原文地址:https://www.cnblogs.com/fzj16888/p/5923232.html 先说一下我的经历,以及解决问题的而过程. 在使用SpringMVC的时候,最开始的时候在配置文 ...