Question about the inability to display 16k octave bands(1/3 oct band)?
조회 수: 1 (최근 30일)
이전 댓글 표시
I use matlab vslm toolkit, the octave plot after analyzing audio can't show 16k octave band, if I want to show 16k octave band, how do I modify the code? I added "16k" to the fctxt, but it didn't work.
How should I change the code?
The VSLM toolkit is attached and the relevant code is as follows~
thanks a lot~
figure1.Missing 16k octave band
This is the code for octave,The cause of the problem may have been found, can anyone tell me how to change it?
switch handles.band.type
case 'oct'
fcb=1000*2.^((-6:1:4));
tstring=sprintf('%s Weighted Octave Band LEQ computed using ANSI Filters',handles.weighting);
dstring='Please Wait Analyzing Data Using ANSI Octave Bands';
tickmarks=1:length(fcb);
otherwise
fcb=1000*2.^((-19:1:13)/3);
tstring=sprintf('%s Weighted 1/3 Octave Band LEQ computed using ANSI Filters',handles.weighting);
dstring='Please Wait Analyzing Data Using ANSI 1/3 Octave Bands';
tickmarks=2:3:length(fcb);
end
J= fcb<(fs/2/sqrt(2)); % this may be causing the problem ————————————————@VBBV
fc=fcb(J); % here the number of elements changes again ————————————————@VBBX
Hd=zeros(length(fc));
% Divide spectrum by Nseg to convert from sum to average over all segments
% note: apply no weighting for NC/RC computations
Pxx=SB./Nseg;
% generate the octave band center frequencies from 16-8khz (or 4 kHz for
% a sampling rate of 22050 Hz
if fs==22050
fc=1000*2.^((-6:1:2));
fctxt={'16','32','63','125','250','500','1k','2k','4k'};
else
fc=1000*2.^((-6:1:4));
fctxt={'16','32','63','125','250','500','1k','2k','4k','8k','16k'};
end
% compute the upper and lower 1/3 octave band frequencies
fl=fc*2^(-1/2);
fu=fc*2^(1/2);
댓글 수: 0
채택된 답변
VBBV
2022년 5월 14일
편집: VBBV
2022년 5월 14일
if fs==22050
fc=1000*2.^((-6:1:2));
fctxt={'16','32','63','125','250','500','1k','2k','4k'};
else
fc=1000*2.^((-6:1:4)); % change this
fctxt={'16','32','63','125','250','500','1k','2k','4k','8k','16k'}; % 11 elements
end
in the 2nd condition, you have 11 elements
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Octave에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!