octspace

Versión 1.3.0.4 (3,38 KB) por Allen
Create logarithmic spacing with 1/N-th octave bands over a specified frequency range.
59 descargas
Actualizado 4 jun 2023

Ver licencia

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

Citar como

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

Compatibilidad con la versión de MATLAB
Se creó con R2023a
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux
Categorías
Más información sobre Octave en Help Center y MATLAB Answers.

Community Treasure Hunt

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

Start Hunting!
Versión Publicado Notas de la versión
1.3.0.4

Replaced varargin with an argument block.

1.2.1

-Provided correct file

1.2