Commit 8edf2be4 authored by Andrew Cohen's avatar Andrew Cohen
Browse files

symbolize wrapper for esym2d

parent 7fb11a38
% quantize input matrix m to N symbols ('a'...'a'+N)
function s=symbolize(m,N)
if size(m,1)==1
m=m';
end
s=[];
mu=mean(m);
sig=cov(m);
s1=sig^-1;
bps=[1/N:1/N:1-1/N];
c2 = chi2inv(bps,size(m,2));
for i= 1: size(m,1)
iq=esym2d(N,c2,mu,s1,m(i,:));
s=[s iq{:}];
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment