octspace

版本 1.3.0.4 (3.4 KB) 作者: Allen
Create logarithmic spacing with 1/N-th octave bands over a specified frequency range.
64.0 次下载
更新时间 2023/6/4

查看许可证

This function creates log spacing for 1/n octave frequency bands for the range of frequencies containing [Fmin, Fmax]. By default, the reference center-band frequency is set at 1 kHz and calculations are preformed using a Base 2 method, but can be changed using the variable input. The reference center-band frequency can be specified as any numerical value. Available calculation methods are Base 2 and Base 10.
REFERENCES TO ANSI, IEC, AND JIS STANDARDS.
  • ANSI S1.11-2004: Specification for octave-band and fractional-octave band analog digital filters, class 1.
  • IEC 1260 (1995 - 07): Electroacoustics - Octave-band and fractional-octave-band filters, class 1.
  • JIS C 1514:2002: Electroacoustics - Octave-band and fractional-octave-band filters, class 1.
EXAMPLE:
% Create 1/6th octave band between 0.1 to 50 Hz and center reference frequency at 1 Hz.
fspan = octspace(0.1,50,6,'ref',1,'base',10);
% Generate plot with RS profiles
Freq = [0.1,1.3,8.3,33.3,50];
Horz = [0.48,4.8,4.8,3.6,3.6];
Vert = [0.201,2.01,2.01,0.81,0.81];
figure
loglog(Freq,Horz,'-*',Freq,Vert,'-*','LineWidth',2)
legend({'RS-Horizontal Motion','RS-Vertical Motion'},'AutoUpdate','off','Location','se')
title('Response Spectra showing 1/6th Octave Band Spacing')
xlabel('Frequency (Hz)')
ylabel('Response Acceleration (g)')
xlim([0.1,50])
ylim([0.1,10])
% Create patches for every other frequency band for visualization
for i=1:2:length(fspan.center)
patch('Vertices',[fspan.low(i),0.1;fspan.low(i),10;fspan.high(i),10;fspan.high(i),0.1],...
'Faces',1:4,'FaceColor',[1,0,0],'FaceAlpha',0.1)
end
set(gca,'children',flipud(get(gca,'children'))) % Reverse order of axes children

引用格式

Allen (2024). octspace (https://www.mathworks.com/matlabcentral/fileexchange/70448-octspace), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R2023a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Octave 的更多信息

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.3.0.4

Replaced varargin with an argument block.

1.2.1

-Provided correct file

1.2