-
Notifications
You must be signed in to change notification settings - Fork 0
/
DSP.m
48 lines (40 loc) · 1.22 KB
/
DSP.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
% Close all figures.
close all
Fs=500;
T=1/Fs;
L=500;
Fs2=4000;
L2=128;
t=linspace(0,2*pi,500);
signal=sin(30*t)+sin(70*t)+sin(100*t)+sin(200*t)+sin(10*t);
signal2=signal(1:64);
Y=fft(signal,500);
G=goertzel(signal,20);
figure
plot(abs(Y))
grid on
grid minor
Y2=fft(signal2,500);
figure
plot(abs(Y2))
grid on
grid minor
emgConvert=table2array(emghealthy(:,2));
Y3=fft(emgConvert,L2);
figure
f2=Fs*(0:(L2-1))/L2;
P3=Y3
plot(f2,abs(Y3))
grid on
grid minor
temp=[0.189514,0.481174,0.16969,0.140174,0.438823,0.0240877,0.00634368,0.0189451,0.0311787,0.479401,0.0323128,0.0525923,0.109624,0.464936,0.0595717,0.0273351,0.0168812,0.0140665,0.0151554,0.0181987,0.0225808,0.0286126,0.0375237,0.0526122,0.0852952,0.217102,0.405919,0.105128,0.0608161,0.0435381,0.0350276,0.0308494,0.0295743,0.0308491,0.0350278,0.0435383,0.0608156,0.105128,0.405919,0.217102,0.0852952,0.0526128,0.0375236,0.0286126,0.0225806,0.0181993,0.0151555,0.0140665,0.0168812,0.0273352,0.0595717,0.464936,0.109624,0.0525922,0.0323127,0.479401,0.0311786,0.0189449,0.0063441,0.0240876,0.438823,0.140174,0.16969,0.481174];
figure
plot(linspace(0,500,64),temp);
grid on
grid minor
Y4=fft(sEMG6(1:1000,1),1000);
figure
plot(abs(Y4(2:end)))
max(TaskTimes)
mean(TaskTimes)
min(TaskTimes)