%% Frequency Bands of Pinion and Gear Mesh
% For this example, consider a simple gear set with an 8-toothed pinion on the input shaft meshing with a 42-toothed spur gear on the output shaft. Assume that the input shaft is spinning at 20 rpm. Construct the gear mesh frequency bands using the physical characteristics of the gear set.

Ni = 8;
No = 42;
FR = 20;
[FB,info] = gearMeshFaultBands(FR,Ni,No)

% FB is a 5x2 array which includes the primary frequencies 1Fi, 1Fo, 1Fa and 1Fm respectively. The structure info contains the center frequencies and labels of each frequency range in FB.
% Copyright 2019 The MathWorks, Inc.