Beam vibration analysis in Matlab