sample code array question

조회 수: 2 (최근 30일)
Rambo
Rambo 2011년 4월 9일
I found this code:
function SECTIONS = makeframe (Y, FS)
% Input the raw signal array and sampling rate % output: 25 critical frequency bands x number of timeframes % output values are energy strength
Y = convertmono(Y); len = length(Y); window = round(0.37.*FS); % hanning window width interval = round(0.0116.*FS); % 512 %interval = 1024; len = len - window; numintervals = len / interval; kk=1; hanw = hanning(window);
%SECTIONS = zeros(interval,numintervals); for ii = 1:interval:len % if ii+interval > len % interval = len-ii+1; % disp('coming to end'); % disp(interval); % disp(ii); % SECTIONS(ii:ii+interval-1,kk)=Y(ii:ii+interval-1); % else % SECTIONS(:,kk)=Y(ii:ii+interval-1); % (8:25pm) SECTIONS(:,kk) = dividefreqs(Y(ii:ii+interval-1),FS).'; % disp(ii) % fprintf('Grabbing interval %g to %g\n',ii,ii+window-1); SECTIONS(:,kk) = dividefreqs(Y(ii:ii+window-1).*hanw,FS).'; % end
% disp(size(SECTIONS)); kk = kk+1; end
One thing that I don't understand is how the array SECTIONS is used since its creation is commented out %SECTIONS = zeros(interval,numintervals); ?
  댓글 수: 1
Oleg Komarov
Oleg Komarov 2011년 4월 9일
Format the code for improved readability.

댓글을 달려면 로그인하십시오.

답변 (2개)

Rambo
Rambo 2011년 4월 9일

Rambo
Rambo 2011년 4월 10일
anyone can help?

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by