功率譜密度指PSD值能量單位單位:g2/Hz際單位應該(m/s2)2/Hz或者(m/s2)2/(1/s)終m2/s3吧
粗略算1g2/Hz=1(10m/s2)2/Hz=100(m/s2)2/Hz=100m2/s3
fs=100; x=-2:1/fs:2; y=sin(3*pi*x); z=rectpuls(x);
figure;plot(x,y,x,z,":r");
my=abs(fft(y)); mz=abs(fft(z));
my=my/max(my); %歸化 mz=mz/max(mz); %歸化
f=(0:1/length(x):1)*fs;
figure;plot(f(1:fs/2),my(1:fs/2),f(1:fs/2),mz(1:fs/2),":r");
my=20*log10(my+eps);mz=20*log10(mz+eps);
figure;plot(f(1:fs/2),my(1:fs/2),f(1:fs/2),mz(1:fs/2),":r"
功率譜密度指PSD值能量單位單位:g2/Hz際單位應該(m/s2)2/Hz或者(m/s2)2/(1/s)終m2/s3吧
粗略算1g2/Hz=1(10m/s2)2/Hz=100(m/s2)2/Hz=100m2/s3
fs=100; x=-2:1/fs:2; y=sin(3*pi*x); z=rectpuls(x);
figure;plot(x,y,x,z,":r");
my=abs(fft(y)); mz=abs(fft(z));
my=my/max(my); %歸化 mz=mz/max(mz); %歸化
f=(0:1/length(x):1)*fs;
figure;plot(f(1:fs/2),my(1:fs/2),f(1:fs/2),mz(1:fs/2),":r");
my=20*log10(my+eps);mz=20*log10(mz+eps);
figure;plot(f(1:fs/2),my(1:fs/2),f(1:fs/2),mz(1:fs/2),":r"