clear all close all clc load gearbox_1900rpm_70load fp=25000; L_usr=2; %liczba uśrednień L=size(AMC_Test_bench_01_Gearbox,1)/L_usr; Buf=buffer(AMC_Test_bench_01_Gearbox(:,2),L); Y=abs(fft(Buf,L))/(L/2); if size(AMC_Test_bench_01_Gearbox,1)/L>2 Y_ave=mean(Y'); else Y_ave=Y; end f = 0:fp/L:fp/2-fp/L; f_ob=1900/60; orders=f/f_ob; %częstotliwości charakterystyczne Shaft1=1; Shaft2=Shaft1/2.91; GMF=23; figure plot([Shaft1 Shaft1],[0 0.1],'k--',[2*Shaft1 2*Shaft1],[0 0.1],'k--'); hold on plot([Shaft2 Shaft2],[0 0.1],'g--',[2*Shaft2 2*Shaft2],[0 0.1],'g--'); hold on plot([GMF GMF],[0 0.1],'r--',[GMF*2 GMF*2],[0 0.1],'r--',[GMF*3 GMF*3],[0 0.1],'r--') plot([GMF-1 GMF-1],[0 0.07],'r--',[GMF*2-1 GMF*2-1],[0 0.07],'r--',[GMF*3-1 GMF*3-1],[0 0.07],'r--') plot([GMF-2 GMF-2],[0 0.07],'r--',[GMF*2-2 GMF*2-2],[0 0.07],'r--',[GMF*3-2 GMF*3-2],[0 0.07],'r--') plot([GMF+1 GMF+1],[0 0.07],'r--',[GMF*2+1 GMF*2+1],[0 0.07],'r--',[GMF*3+1 GMF*3+1],[0 0.07],'r--') plot([GMF+2 GMF+2],[0 0.07],'r--',[GMF*2+2 GMF*2+2],[0 0.07],'r--',[GMF*3+2 GMF*3+2],[0 0.07],'r--') plot(orders,Y_ave(1:L/2),'b','lineWidth',2); xlim([0 80])