Table 1.
Custom script used for loading data and carrying out both discrete fast Fourier transforms [5] and amor and bump continuous wavelet transforms [6] for the test data of participant 0003.
| % Read in the Excel spreadsheets made from the WinDaQ files. |
| Acc=importdata('AccData\20161227_PDMotion_0003 combine sheet.xlsx'); |
| % Set up data file labels for output. |
| Name1='wlet0003′; |
| Name4='.jpg'; |
| % Set up offsets and lengths for right and left episodes (numbers of |
| samples, from observed data in Excel) |
| % PS = Pronation/Supination |
| % TT = Toe tap |
| % FT = Finger Tap |
| % HM = Hand Motion |
| % LA = Leg Agility |
| PSroff=1008; |
| PSrlen=446; |
| PSloff=2075; |
| PSllen=441; |
| TTroff=861; |
| TTrlen=326; |
| TTloff=1932; |
| TTllen=372; |
| FTroff=882; |
| FTrlen=364; |
| FTloff=2472; |
| FTllen=244; |
| HMroff=1140; |
| HMrlen=426; |
| HMloff=2194; |
| HMllen=367; |
| LAroff=727; |
| LArlen=413; |
| LAloff=1672; |
| LAllen=448; |
| % Record output of accelerometers one at a time. |
| % Pronation/supination |
| % the first three columns are right index finger (x, y, z) |
| % the second three columns are right wrist (x, y, z) |
| % the third three columns are left index finger (x, y, z) |
| % the fourth three columns are left wrist (x, y, z) |
| Name2='_PS_'; |
| % Set up start (offset) and finish (length) for the right six traces. |
| sampoff=PSroff; |
| Len=PSrlen; |
| sampend=sampoff+Len; |
| % Copy data. |
| x1=Acc.data.PS(sampoff:sampend,4); |
| % Perform fast Fourier transform (FFT). |
| x1fft=fft(x1); |
| % Obtain magnitude of transform by taking the absolute value of the complex number. |
| x1ffta=abs(x1fft); |
| x2=Acc.data.PS(sampoff:sampend,5); |
| x2fft=fft(x2); |
| x2ffta=abs(x2fft); |
| x3=Acc.data.PS(sampoff:sampend,6); |
| x3fft=fft(x3); |
| x3ffta=abs(x3fft); |
| x4=Acc.data.PS(sampoff:sampend,7); |
| x4fft=fft(x4); |
| x4ffta=abs(x4fft); |
| x5=Acc.data.PS(sampoff:sampend,8); |
| x5fft=fft(x5); |
| x5ffta=abs(x5fft); |
| x6=Acc.data.PS(sampoff:sampend,9); |
| x6fft=fft(x6); |
| x6ffta=abs(x6fft); |
| % Perform bump continuous wavelet transforms and write them out using saveas. |
| % in Name3 there are three letters. |
| % r=right, l=left |
| % f=finger, w=wrist, a=ankle, t=toe |
| % x, y, and z are components of acceleration. |
| cwt(x1,'bump',80) |
| Name3='rfx'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x2,'bump',80) |
| Name3='rfy'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x3,'bump',80) |
| Name3='rfz'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x4,'bump',80) |
| Name3='rwx'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x5,'bump',80) |
| Name3='rwy'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x6,'bump',80) |
| Name3='rwz'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| % Perform amor continuous wavelet transforms and write them out using saveas. |
| %amor wavelet |
| cwt(x1,'amor',80) |
| Name3='rfxA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x2,'amor',80) |
| Name3='rfyA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x3,'amor',80) |
| Name3='rfzA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x4,'amor',80) |
| Name3='rwxA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x5,'amor',80) |
| Name3='rwyA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x6,'amor',80) |
| Name3='rwzA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| % FFTs of the left components (Finger and wrist order are the same.) |
| % left offset |
| sampoff=PSloff; |
| Len=PSllen; |
| sampend=sampoff+Len; |
| x7=Acc.data.PS(sampoff:sampend,10); |
| x7fft=fft(x7); |
| x7ffta=abs(x7fft); |
| x8=Acc.data.PS(sampoff:sampend,11); |
| x8fft=fft(x8); |
| x8ffta=abs(x8fft); |
| x9=Acc.data.PS(sampoff:sampend,12); |
| x9fft=fft(x9); |
| x9ffta=abs(x9fft); |
| x10=Acc.data.PS(sampoff:sampend,13); |
| x10fft=fft(x10); |
| x10ffta=abs(x10fft); |
| x11=Acc.data.PS(sampoff:sampend,14); |
| x11fft=fft(x11); |
| x11ffta=abs(x11fft); |
| x12=Acc.data.PS(sampoff:sampend,15); |
| x12fft=fft(x12); |
| x12ffta=abs(x12fft); |
| % Perform bump continuous wavelet transforms and write them out using saveas. |
| cwt(x7,'bump',80) |
| Name3='lfx'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x8,'bump',80) |
| Name3='lfy'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x9,'bump',80) |
| Name3='lfz'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x10,'bump',80) |
| Name3='lwx'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x11,'bump',80) |
| Name3='lwy'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x12,'bump',80) |
| Name3='lwz'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| %amor wavelet |
| % % Perform amor continuous wavelet transforms and write them out using saveas. |
| cwt(x7,'amor',80) |
| Name3='lfxA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x8,'amor',80) |
| Name3='lfyA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x9,'amor',80) |
| Name3='lfzA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x10,'amor',80) |
| Name3='lwxA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x11,'amor',80) |
| Name3='lwyA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x12,'amor',80) |
| Name3='lwzA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| % Store FFT data for writing to an Excel file. |
| PSFFT(1:256,1)=x1ffta(1:256); |
| PSFFT(1:256,2)=x2ffta(1:256); |
| PSFFT(1:256,3)=x3ffta(1:256); |
| PSFFT(1:256,4)=x4ffta(1:256); |
| PSFFT(1:256,5)=x5ffta(1:256); |
| PSFFT(1:256,6)=x6ffta(1:256); |
| PSFFT(1:256,7)=x7ffta(1:256); |
| PSFFT(1:256,8)=x8ffta(1:256); |
| PSFFT(1:256,9)=x9ffta(1:256); |
| PSFFT(1:256,10)=x10ffta(1:256); |
| PSFFT(1:256,11)=x11ffta(1:256); |
| PSFFT(1:256,12)=x12ffta(1:256); |
| % Toe tapping data |
| % the first 3 columns are right ankle (x, y, z) |
| % the second 3 columns are right big toe (x, y, z) |
| % the third 3 columns are left ankle (x, y, z) |
| % the fourth 3 columns are left big toe (x, y, z) |
| Name2='_TT_'; |
| sampoff=TTroff; |
| Len=TTrlen; |
| sampend=sampoff+Len; |
| x1=Acc.data.TT(sampoff:sampend,4); |
| x1fft=fft(x1); |
| x1ffta=abs(x1fft); |
| x2=Acc.data.TT(sampoff:sampend,5); |
| x2fft=fft(x2); |
| x2ffta=abs(x2fft); |
| x3=Acc.data.TT(sampoff:sampend,6); |
| x3fft=fft(x3); |
| x3ffta=abs(x3fft); |
| x4=Acc.data.TT(sampoff:sampend,7); |
| x4fft=fft(x4); |
| x4ffta=abs(x4fft); |
| x5=Acc.data.TT(sampoff:sampend,8); |
| x5fft=fft(x5); |
| x5ffta=abs(x5fft); |
| x6=Acc.data.TT(sampoff:sampend,9); |
| x6fft=fft(x6); |
| x6ffta=abs(x6fft); |
| % Perform bump continuous wavelet transforms and write them out using saveas. |
| cwt(x1,'bump',80) |
| Name3='rax'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x2,'bump',80) |
| Name3='ray'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x3,'bump',80) |
| Name3='raz'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x4,'bump',80) |
| Name3='rtx'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x5,'bump',80) |
| Name3='rty'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x6,'bump',80) |
| Name3='rtz'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| % Perform amor continuous wavelet transforms and write them out using saveas. |
| cwt(x1,'amor',80) |
| Name3='raxA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x2,'amor',80) |
| Name3='rayA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x3,'amor',80) |
| Name3='razA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x4,'amor',80) |
| Name3='rtxA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x5,'amor',80) |
| Name3='rtyA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x6,'amor',80) |
| Name3='rtzA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| % left offset |
| sampoff=TTloff; |
| Len=TTllen; |
| sampend=sampoff+Len; |
| x7=Acc.data.TT(sampoff:sampend,10); |
| x7fft=fft(x7); |
| x7ffta=abs(x7fft); |
| x8=Acc.data.TT(sampoff:sampend,11); |
| x8fft=fft(x8); |
| x8ffta=abs(x8fft); |
| x9=Acc.data.TT(sampoff:sampend,12); |
| x9fft=fft(x9); |
| x9ffta=abs(x9fft); |
| x10=Acc.data.TT(sampoff:sampend,13); |
| x10fft=fft(x10); |
| x10ffta=abs(x10fft); |
| x11=Acc.data.TT(sampoff:sampend,14); |
| x11fft=fft(x11); |
| x11ffta=abs(x11fft); |
| x12=Acc.data.TT(sampoff:sampend,15); |
| x12fft=fft(x12); |
| x12ffta=abs(x12fft); |
| % Perform bump continuous wavelet transforms and write them out using saveas. |
| cwt(x7,'bump',80) |
| Name3='lax'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x8,'bump',80) |
| Name3='lay'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x9,'bump',80) |
| Name3='laz'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x10,'bump',80) |
| Name3='ltx'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x11,'bump',80) |
| Name3='lty'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x12,'bump',80) |
| Name3='ltz'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| % Perform amor continuous wavelet transforms and write them out using saveas. |
| %amor wavelet |
| cwt(x7,'amor',80) |
| Name3='laxA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x8,'amor',80) |
| Name3='layA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x9,'amor',80) |
| Name3='lazA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x10,'amor',80) |
| Name3='ltxA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x11,'amor',80) |
| Name3='ltyA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x12,'amor',80) |
| Name3='ltzA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| %save FFTs in an array for writing |
| TTFFT(1:256,1)=x1ffta(1:256); |
| TTFFT(1:256,2)=x2ffta(1:256); |
| TTFFT(1:256,3)=x3ffta(1:256); |
| TTFFT(1:256,4)=x4ffta(1:256); |
| TTFFT(1:256,5)=x5ffta(1:256); |
| TTFFT(1:256,6)=x6ffta(1:256); |
| TTFFT(1:256,7)=x7ffta(1:256); |
| TTFFT(1:256,8)=x8ffta(1:256); |
| TTFFT(1:256,9)=x9ffta(1:256); |
| TTFFT(1:256,10)=x10ffta(1:256); |
| TTFFT(1:256,11)=x11ffta(1:256); |
| TTFFT(1:256,12)=x12ffta(1:256); |
| % the rest of the script has the same structure |
| % finger tap |
| Name2='_FT_'; |
| sampoff=FTroff; |
| Len=FTrlen; |
| sampend=sampoff+Len; |
| x1=Acc.data.FT(sampoff:sampend,4); |
| x1fft=fft(x1); |
| x1ffta=abs(x1fft); |
| x2=Acc.data.FT(sampoff:sampend,5); |
| x2fft=fft(x2); |
| x2ffta=abs(x2fft); |
| x3=Acc.data.FT(sampoff:sampend,6); |
| x3fft=fft(x3); |
| x3ffta=abs(x3fft); |
| x4=Acc.data.FT(sampoff:sampend,7); |
| x4fft=fft(x4); |
| x4ffta=abs(x4fft); |
| x5=Acc.data.FT(sampoff:sampend,8); |
| x5fft=fft(x5); |
| x5ffta=abs(x5fft); |
| x6=Acc.data.FT(sampoff:sampend,9); |
| x6fft=fft(x6); |
| x6ffta=abs(x6fft); |
| % Perform bump continuous wavelet transforms and write them out using saveas. |
| cwt(x1,'bump',80) |
| Name3='rfx'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x2,'bump',80) |
| Name3='rfy'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x3,'bump',80) |
| Name3='rfz'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x4,'bump',80) |
| Name3='rwx'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x5,'bump',80) |
| Name3='rwy'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x6,'bump',80) |
| Name3='rwz'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| % Perform amor continuous wavelet transforms and write them out using saveas. |
| cwt(x1,'amor',80) |
| Name3='rfxA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x2,'amor',80) |
| Name3='rfyA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x3,'amor',80) |
| Name3='rfzA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x4,'amor',80) |
| Name3='rwxA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x5,'amor',80) |
| Name3='rwyA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x6,'amor',80) |
| Name3='rwzA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| sampoff=FTloff; |
| Len=FTllen; |
| sampend=sampoff+Len; |
| x7=Acc.data.FT(sampoff:sampend,10); |
| x7fft=fft(x7); |
| x7ffta=abs(x7fft); |
| x8=Acc.data.FT(sampoff:sampend,11); |
| x8fft=fft(x8); |
| x8ffta=abs(x8fft); |
| x9=Acc.data.FT(sampoff:sampend,12); |
| x9fft=fft(x9); |
| x9ffta=abs(x9fft); |
| x10=Acc.data.FT(sampoff:sampend,13); |
| x10fft=fft(x10); |
| x10ffta=abs(x10fft); |
| x11=Acc.data.FT(sampoff:sampend,14); |
| x11fft=fft(x11); |
| x11ffta=abs(x11fft); |
| x12=Acc.data.FT(sampoff:sampend,15); |
| x12fft=fft(x12); |
| x12ffta=abs(x12fft); |
| % Perform bump continuous wavelet transforms and write them out using saveas. |
| cwt(x7,'bump',80) |
| Name3='lfx'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x8,'bump',80) |
| Name3='lfy'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x9,'bump',80) |
| Name3='lfz'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x10,'bump',80) |
| Name3='lwx'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x11,'bump',80) |
| Name3='lwy'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x12,'bump',80) |
| Name3='lwz'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| % Perform amor continuous wavelet transforms and write them out using saveas. |
| cwt(x7,'amor',80) |
| Name3='lfxA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x8,'amor',80) |
| Name3='lfyA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x9,'amor',80) |
| Name3='lfzA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x10,'amor',80) |
| Name3='lwxA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x11,'amor',80) |
| Name3='lwyA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x12,'amor',80) |
| Name3='lwzA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| FTFFT(1:256,1)=x1ffta(1:256); |
| FTFFT(1:256,2)=x2ffta(1:256); |
| FTFFT(1:256,3)=x3ffta(1:256); |
| FTFFT(1:256,4)=x4ffta(1:256); |
| FTFFT(1:256,5)=x5ffta(1:256); |
| FTFFT(1:256,6)=x6ffta(1:256); |
| FTFFT(1:256,7)=x7ffta(1:256); |
| FTFFT(1:256,8)=x8ffta(1:256); |
| FTFFT(1:256,9)=x9ffta(1:256); |
| FTFFT(1:256,10)=x10ffta(1:256); |
| FTFFT(1:256,11)=x11ffta(1:256); |
| FTFFT(1:256,12)=x12ffta(1:256); |
| %Hand motion |
| Name2='_HM_'; |
| sampoff=HMroff; |
| Len=HMrlen; |
| sampend=Len+sampoff; |
| x1=Acc.data.HM(sampoff:sampend,4); |
| x1fft=fft(x1); |
| x1ffta=abs(x1fft); |
| x2=Acc.data.HM(sampoff:sampend,5); |
| x2fft=fft(x2); |
| x2ffta=abs(x2fft); |
| x3=Acc.data.HM(sampoff:sampend,6); |
| x3fft=fft(x3); |
| x3ffta=abs(x3fft); |
| x4=Acc.data.HM(sampoff:sampend,7); |
| x4fft=fft(x4); |
| x4ffta=abs(x4fft); |
| x5=Acc.data.HM(sampoff:sampend,8); |
| x5fft=fft(x5); |
| x5ffta=abs(x5fft); |
| x6=Acc.data.HM(sampoff:sampend,9); |
| x6fft=fft(x6); |
| x6ffta=abs(x6fft); |
| % Perform amor continuous wavelet transforms and write them out using saveas. |
| cwt(x1,'amor',80) |
| Name3='rfxA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x2,'amor',80) |
| Name3='rfyA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x3,'amor',80) |
| Name3='rfzA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x4,'amor',80) |
| Name3='rwxA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x5,'amor',80) |
| Name3='rwyA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x6,'amor',80) |
| Name3='rwzA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| sampoff=HMloff; |
| len=HMllen; |
| sampend=len+sampoff; |
| x7=Acc.data.HM(sampoff:sampend,10); |
| x7fft=fft(x7); |
| x7ffta=abs(x7fft); |
| x8=Acc.data.HM(sampoff:sampend,11); |
| x8fft=fft(x8); |
| x8ffta=abs(x8fft); |
| x9=Acc.data.HM(sampoff:sampend,12); |
| x9fft=fft(x9); |
| x9ffta=abs(x9fft); |
| x10=Acc.data.HM(sampoff:sampend,13); |
| x10fft=fft(x10); |
| x10ffta=abs(x10fft); |
| x11=Acc.data.HM(sampoff:sampend,14); |
| x11fft=fft(x11); |
| x11ffta=abs(x11fft); |
| x12=Acc.data.HM(sampoff:sampend,15); |
| x12fft=fft(x12); |
| x12ffta=abs(x12fft); |
| % Perform bump continuous wavelet transforms and write them out using saveas. |
| cwt(x7,'bump',80) |
| Name3='lfx'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x8,'bump',80) |
| Name3='lfy'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x9,'bump',80) |
| Name3='lfz'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x10,'bump',80) |
| Name3='lwx'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x11,'bump',80) |
| Name3='lwy'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x12,'bump',80) |
| Name3='lwz'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| % Perform amor continuous wavelet transforms and write them out using saveas. |
| cwt(x7,'amor',80) |
| Name3='lfxA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x8,'amor',80) |
| Name3='lfyA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x9,'amor',80) |
| Name3='lfzA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x10,'amor',80) |
| Name3='lwxA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x11,'amor',80) |
| Name3='lwyA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x12,'amor',80) |
| Name3='lwzA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| HMFFT(1:256,1)=x1ffta(1:256); |
| HMFFT(1:256,2)=x2ffta(1:256); |
| HMFFT(1:256,3)=x3ffta(1:256); |
| HMFFT(1:256,4)=x4ffta(1:256); |
| HMFFT(1:256,5)=x5ffta(1:256); |
| HMFFT(1:256,6)=x6ffta(1:256); |
| HMFFT(1:256,7)=x7ffta(1:256); |
| HMFFT(1:256,8)=x8ffta(1:256); |
| HMFFT(1:256,9)=x9ffta(1:256); |
| HMFFT(1:256,10)=x10ffta(1:256); |
| HMFFT(1:256,11)=x11ffta(1:256); |
| HMFFT(1:256,12)=x12ffta(1:256); |
| %Leg Agility |
| Name2='_LA_'; |
| sampoff=LAroff; |
| len=LArlen; |
| sampend=len+sampoff; |
| x1=Acc.data.LA(sampoff:sampend,4); |
| x1fft=fft(x1); |
| x1ffta=abs(x1fft); |
| x2=Acc.data.LA(sampoff:sampend,5); |
| x2fft=fft(x2); |
| x2ffta=abs(x2fft); |
| x3=Acc.data.LA(sampoff:sampend,6); |
| x3fft=fft(x3); |
| x3ffta=abs(x3fft); |
| x4=Acc.data.LA(sampoff:sampend,7); |
| x4fft=fft(x4); |
| x4ffta=abs(x4fft); |
| x5=Acc.data.LA(sampoff:sampend,8); |
| x5fft=fft(x5); |
| x5ffta=abs(x5fft); |
| x6=Acc.data.LA(sampoff:sampend,9); |
| x6fft=fft(x6); |
| x6ffta=abs(x6fft); |
| % Perform bump continuous wavelet transforms and write them out using saveas. |
| cwt(x1,'bump',80) |
| Name3='rax'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x2,'bump',80) |
| Name3='ray'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x3,'bump',80) |
| Name3='raz'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x4,'bump',80) |
| Name3='rtx'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x5,'bump',80) |
| Name3='rty'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x6,'bump',80) |
| Name3='rtz'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| Perform amor continuous wavelet transforms and write them out using saveas. |
| cwt(x1,'amor',80) |
| Name3='raxA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x2,'amor',80) |
| Name3='rayA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x3,'amor',80) |
| Name3='razA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x4,'amor',80) |
| Name3='rtxA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x5,'amor',80) |
| Name3='rtyA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x6,'amor',80) |
| Name3='rtzA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| sampoff=LAloff; |
| len=LAllen; |
| sampend=len+sampoff; |
| x7=Acc.data.LA(sampoff:sampend,10); |
| x7fft=fft(x7); |
| x7ffta=abs(x7fft); |
| x8=Acc.data.LA(sampoff:sampend,11); |
| x8fft=fft(x8); |
| x8ffta=abs(x8fft); |
| x9=Acc.data.LA(sampoff:sampend,12); |
| x9fft=fft(x9); |
| x9ffta=abs(x9fft); |
| x10=Acc.data.LA(sampoff:sampend,13); |
| x10fft=fft(x10); |
| x10ffta=abs(x10fft); |
| x11=Acc.data.LA(sampoff:sampend,14); |
| x11fft=fft(x11); |
| x11ffta=abs(x11fft); |
| x12=Acc.data.LA(sampoff:sampend,15); |
| x12fft=fft(x12); |
| x12ffta=abs(x12fft); |
| % Perform bump continuous wavelet transforms and write them out using saveas. |
| cwt(x7,'bump',80) |
| Name3='lax'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x8,'bump',80) |
| Name3='lay'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x9,'bump',80) |
| Name3='laz'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x10,'bump',80) |
| Name3='ltx'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x11,'bump',80) |
| Name3='lty'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x12,'bump',80) |
| Name3='ltz'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| % Perform amor continuous wavelet transforms and write them out using saveas. |
| cwt(x7,'amor',80) |
| Name3='laxA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x8,'amor',80) |
| Name3='layA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x9,'amor',80) |
| Name3='lazA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x10,'amor',80) |
| Name3='ltxA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x11,'amor',80) |
| Name3='ltyA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| cwt(x12,'amor',80) |
| Name3='ltzA'; |
| saveas(gcf,strcat(Name1,Name2,Name3,Name4)); |
| LAFFT(1:256,1)=x1ffta(1:256); |
| LAFFT(1:256,2)=x2ffta(1:256); |
| LAFFT(1:256,3)=x3ffta(1:256); |
| LAFFT(1:256,4)=x4ffta(1:256); |
| LAFFT(1:256,5)=x5ffta(1:256); |
| LAFFT(1:256,6)=x6ffta(1:256); |
| LAFFT(1:256,7)=x7ffta(1:256); |
| LAFFT(1:256,8)=x8ffta(1:256); |
| LAFFT(1:256,9)=x9ffta(1:256); |
| LAFFT(1:256,10)=x10ffta(1:256); |
| LAFFT(1:256,11)=x11ffta(1:256); |
| LAFFT(1:256,12)=x12ffta(1:256); |
| % Write out the FFT data as a single Excel file with multiple pages. |
| xlswrite('PDFFT_0003.xlsx',PSFFT,'Pro-Sup'); |
| xlswrite('PDFFT_0003.xlsx',HMFFT,'Hand Motion'); |
| xlswrite('PDFFT_0003.xlsx',FTFFT,'Finger Tap'); |
| xlswrite('PDFFT_0003.xlsx',TTFFT,'Toe Tap'); |
| xlswrite('PDFFT_0003.xlsx',LAFFT,'Leg Agility'); |