質問編集履歴
1
少しソースコードを変更しました
test
CHANGED
File without changes
|
test
CHANGED
@@ -28,21 +28,17 @@
|
|
28
28
|
|
29
29
|
T = 1/Fs; % Sampling period
|
30
30
|
|
31
|
-
|
31
|
+
Y = fft(X,num);
|
32
32
|
|
33
|
+
p2 = abs(Y/num);
|
33
34
|
|
34
|
-
|
35
|
-
Y = fft(X);
|
36
|
-
|
37
|
-
p2 = abs(Y/L);
|
38
|
-
|
39
|
-
p1 = p2(1:
|
35
|
+
p1 = p2(1:num/2+1);
|
40
36
|
|
41
37
|
p1(2:end-1) = 2*p1(2:end-1);
|
42
38
|
|
43
39
|
|
44
40
|
|
45
|
-
f = Fs*(0:(
|
41
|
+
f = Fs*(0:(num/2))/num;
|
46
42
|
|
47
43
|
|
48
44
|
|