mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 01:26:58 +00:00
Working codec2 support
This commit is contained in:
50
libs/libcodec2/octave/lsp_pdf.m
Normal file
50
libs/libcodec2/octave/lsp_pdf.m
Normal file
@@ -0,0 +1,50 @@
|
||||
% lsp_pdf.m
|
||||
% David Rowe 2 Oct 2009
|
||||
% Plots histograms (PDF estimates) of LSP training data
|
||||
|
||||
function lsp_pdf(lsp)
|
||||
[r,c] = size(lsp);
|
||||
|
||||
% LSPs
|
||||
|
||||
figure(3);
|
||||
clf;
|
||||
[x,y] = hist(lsp(:,1),100);
|
||||
plot(y*4000/pi,x,";1;");
|
||||
hold on;
|
||||
for i=2:c
|
||||
[x,y] = hist(lsp(:,i),100);
|
||||
legend = sprintf(";%d;",i);
|
||||
plot(y*4000/pi,x,legend);
|
||||
endfor
|
||||
hold off;
|
||||
grid;
|
||||
|
||||
% LSP differences
|
||||
|
||||
figure(4);
|
||||
clf;
|
||||
subplot(211)
|
||||
[x,y] = hist(lsp(:,1),100);
|
||||
plot(y,x,";1;");
|
||||
hold on;
|
||||
for i=2:5
|
||||
[x,y] = hist(lsp(:,i) - lsp(:,i-1),100);
|
||||
legend = sprintf(";%d;",i);
|
||||
plot(y,x,legend);
|
||||
endfor
|
||||
hold off;
|
||||
grid;
|
||||
|
||||
subplot(212)
|
||||
[x,y] = hist(lsp(:,6)-lsp(:,5),100);
|
||||
plot(y,x,";6;");
|
||||
hold on;
|
||||
for i=7:c
|
||||
[x,y] = hist(lsp(:,i) - lsp(:,i-1),100);
|
||||
legend = sprintf(";%d;",i);
|
||||
plot(y,x,legend);
|
||||
endfor
|
||||
hold off;
|
||||
grid;
|
||||
endfunction
|
Reference in New Issue
Block a user