📄 correlogramarray.m
字号:
function movie = CorrelogramArray(data, sr, frameRate, width)% function movie = CorrelogramArray(data, sr, frameRate, width)% Compute an array of correlogram frames, from the sound file data with% a sampling rate of sr Hz. Compute frameRate frames per second, using% a window size of "width" samples.% (c) 1998 Interval Research Corporationif nargin < 2, sr = 16000; endif nargin < 3, frameRate = 12; endif nargin < 4, width = 256; end[channels, len] = size(data);frameIncrement = fix(sr/frameRate);frameCount = floor((len-width)/frameIncrement)+1;fprintf('Correlogram spacing is %g samples per frame.\n', frameIncrement);movie = zeros(channels*width, frameCount);for i=1:frameCount start = (i-1)*frameIncrement + 1; pic = CorrelogramFrame(data, width, start, frameIncrement*4); minimum = min(min(pic)); maximum = max(max(pic)); image((pic-minimum)/(maximum-minimum)*length(colormap)); drawnow; movie(:,i) = reshape(pic, channels*width, 1);end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -