資源簡介
計算矩陣各列與其他各列的互相關(guān)系數(shù),并按照概率分布利用直方圖的形式展示出來。
該互相關(guān)系數(shù)的定義參考Michael Elad的《Sparse and Redundant Representations》p25 Definition2.3

代碼片段和文件信息
%%?Mutual-coherence?of?a?Given?Matrix?
%??編程人--電子工程學院?代林??Email:?dailin513@126.com
%??編程時間:2013年07月25日
%%?Genet?Process
clear?all;
clc;
%%%?parameter?setting
%%%?參數(shù)設(shè)定
L?=?11;M?=?11;P?=?11;N?=?11;
%%%?given?matrix
%%%?給定矩陣
InputMatrix?=?randn(LL*M);???????????????%?給定矩陣
%%%?mutual?coherence?computing?
%%%?互相關(guān)系數(shù)計算
[row?column]?=?size(InputMatrix);?????????%?矩陣行列
r=zeros(1column*(column-1));
for?i?=?1:column
????for?j?=?1:column
????????if?j?~=?i
????????????tempi?=?InputMatrix(:i);
????????????tempj?=?InputMatrix(:j);
????????????temp?=?abs(tempi‘*tempj)/(norm(tempi)*norm(tempj));
????????????r((i-1)*column+j)?=?temp;
????????end
????end
end
%%%?generated?data?distribution?computing
%%%?統(tǒng)計生成數(shù)據(jù)的概率分布(按區(qū)間)
t?=?0:.02:1;
[nxout]?=?hist(rt);
yout?=?n/length(r);
%%%?plot
%%%?畫出直方圖
bar(xoutyout*100);grid?on
xlim([01]);ylim([0100]);
xlabel(‘Mutual-coherence?of?the?Sensing?Matrix‘);
ylabel(‘Statistical?Value?(%)‘);
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????1030??2013-07-25?22:19??Mutualcoherenceofagivenmatrix.m
- 上一篇:四輸入表決器
- 下一篇:pjsip客戶端與服務(wù)端sip通信樣例
評論
共有 條評論