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);

采纳的回答

VBBV
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
  5 个评论

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Octave 的更多信息

产品


版本

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by