wolffd@0
|
1
|
wolffd@0
|
2
|
wolffd@0
|
3 %seglengths
|
wolffd@0
|
4 %vols
|
wolffd@0
|
5 %periods
|
wolffd@0
|
6 %name
|
wolffd@0
|
7
|
wolffd@0
|
8 %
|
wolffd@0
|
9 % datlen=size(data,1);
|
wolffd@0
|
10 % maxseglen=10;
|
wolffd@0
|
11 % clear segvol;
|
wolffd@0
|
12 % clear seglengths;
|
wolffd@0
|
13 % clear repetitions;
|
wolffd@0
|
14 % clear name;
|
wolffd@0
|
15 %
|
wolffd@0
|
16 % filectr=0;
|
wolffd@0
|
17 % lineptr=15;
|
wolffd@0
|
18 %
|
wolffd@0
|
19 % while lineptr <= size(textdata,1)
|
wolffd@0
|
20 % if ~strcmp('',textdata{lineptr,1})
|
wolffd@0
|
21 % path = textdata{lineptr,1};
|
wolffd@0
|
22 % end
|
wolffd@0
|
23 % if ~strcmp('',textdata{lineptr,2})
|
wolffd@0
|
24 % filectr=filectr+1;
|
wolffd@0
|
25 % name{filectr} = strcat(path,'\',textdata{lineptr,2});
|
wolffd@0
|
26 % datapos=lineptr-14;
|
wolffd@0
|
27 %
|
wolffd@0
|
28 % segctr=0;
|
wolffd@0
|
29 % while ~isnan(data(datapos,2))&& datapos < datlen
|
wolffd@0
|
30 % segctr=segctr+1;
|
wolffd@0
|
31 % seglengths(filectr,segctr)= data(datapos,2);
|
wolffd@0
|
32 % if ~isnan(data(datapos,3))
|
wolffd@0
|
33 % repetitions(filectr,segctr)=data(datapos,3);
|
wolffd@0
|
34 % end
|
wolffd@0
|
35 % segvol(filectr,segctr)=data(datapos,4);
|
wolffd@0
|
36 % datapos=datapos+1;
|
wolffd@0
|
37 % lineptr = lineptr+1;
|
wolffd@0
|
38 % end
|
wolffd@0
|
39 % end
|
wolffd@0
|
40 % lineptr = lineptr+1;
|
wolffd@0
|
41 % end
|
wolffd@0
|
42
|
wolffd@0
|
43
|
wolffd@0
|
44 compl_len=sum(seglengths,2);%ins secs
|
wolffd@0
|
45 compl_std=std(compl_len);
|
wolffd@0
|
46 compl_mean=mean(compl_len);
|
wolffd@0
|
47
|
wolffd@0
|
48 numsegs=seglengths>0;
|
wolffd@0
|
49 numsegs=sum(numsegs,2);
|
wolffd@0
|
50 meannumsegs=mean(numsegs)
|
wolffd@0
|
51 minnumsegs=min(numsegs)
|
wolffd@0
|
52 maxnumsegs=max(numsegs)
|
wolffd@0
|
53
|
wolffd@0
|
54 for i=1:maxnumsegs %segmentlänge, betrachtet werden jeweils alle segs
|
wolffd@0
|
55 % mit ausreichender länge
|
wolffd@0
|
56 valid_cols=find(numsegs>=i);
|
wolffd@0
|
57 mean_seglen(i)=mean(seglengths(valid_cols,i));
|
wolffd@0
|
58 min_seglen(i)=min(seglengths(valid_cols,i));
|
wolffd@0
|
59 max_seglen(i)=max(seglengths(valid_cols,i));
|
wolffd@0
|
60 std_seglen(i)=std(seglengths(valid_cols,i));%in s
|
wolffd@0
|
61 end
|
wolffd@0
|
62
|
wolffd@0
|
63 % valid_cols=find(numsegs==floor(meannumsegs));
|
wolffd@0
|
64 % for i=1:floor(mean(numsegs)) %segmentlänge, betrachtet werden jeweils alle segs
|
wolffd@0
|
65 % % mit genau floor(mittlerer) länge
|
wolffd@0
|
66 % mean_seglen2(i)=mean(seglengths(valid_cols,i));
|
wolffd@0
|
67 % min_seglen2(i)=min(seglengths(valid_cols,i));
|
wolffd@0
|
68 % max_seglen2(i)=max(seglengths(valid_cols,i));
|
wolffd@0
|
69 % std_seglen2(i)=std(seglengths(valid_cols,i));%in s
|
wolffd@0
|
70 % end
|
wolffd@0
|
71
|
wolffd@0
|
72 %längen
|
wolffd@0
|
73 seglen_all=reshape(seglengths,115*6,1);
|
wolffd@0
|
74 goodlens=find(seglen_all>0);
|
wolffd@0
|
75 mean_seglen_all=mean(seglen_all(goodlens));
|
wolffd@0
|
76 std_seglen_all=std(seglen_all(goodlens));
|
wolffd@0
|
77 for i=1:maxnumsegs
|
wolffd@0
|
78 segs(i)=sum(numsegs==i);
|
wolffd@0
|
79 end
|
wolffd@0
|
80
|
wolffd@0
|
81 period_segs=sum(repetitions>0,2);
|
wolffd@0
|
82 for i=1:maxnumsegs
|
wolffd@0
|
83 havenumperiodsegs(i)=sum(period_segs==i);
|
wolffd@0
|
84 end
|
wolffd@0
|
85 segs_period=(repetitions>0);
|
wolffd@0
|
86 sum((period_segs==3)&(numsegs==4))
|
wolffd@0
|
87 sum((period_segs==2)&(numsegs==4))
|
wolffd@0
|
88 sum(((period_segs==4)&(numsegs==5)))
|
wolffd@0
|
89 sum(((period_segs==3)&(numsegs==5)))
|
wolffd@0
|
90
|
wolffd@0
|
91 better_half_ind=find((period_segs==3)&(numsegs==4));
|
wolffd@0
|
92 better_half_len=seglengths(better_half_ind,:);
|
wolffd@0
|
93 better_half_mean=mean(better_half_len,1);
|
wolffd@0
|
94 better_half_std=std(better_half_len);
|
wolffd@0
|
95
|
wolffd@0
|
96 %wiederholungen
|
wolffd@0
|
97 period_all=reshape(repetitions,115*6,1);
|
wolffd@0
|
98 goodreps=find(period_all>0);
|
wolffd@0
|
99 period_all=period_all(goodreps);
|
wolffd@0
|
100 peri_all_mean=mean(period_all);
|
wolffd@0
|
101 peri_all_std=std(period_all);
|
wolffd@0
|
102
|
wolffd@0
|
103 %frequenzen
|
wolffd@0
|
104 freqs = repetitions./(seglengths./1000);
|
wolffd@0
|
105 freqs_all=reshape(freqs,115*6,1);
|
wolffd@0
|
106 freqs_all=freqs_all(find(~isnan(freqs_all) & (freqs_all>0)));
|
wolffd@0
|
107 freqs_all_mean=mean(freqs_all);
|
wolffd@0
|
108 freqs_all_std=std(freqs_all);
|
wolffd@0
|
109
|
wolffd@0
|
110
|
wolffd@0
|
111 better_h_f=repetitions(better_half_ind,2:4)./(seglengths(better_half_ind,2:4)./1000);
|
wolffd@0
|
112 better_h_f_mean=mean(better_h_f);
|
wolffd@0
|
113 better_h_f_std=std(better_h_f);
|
wolffd@0
|
114 better_h_f_min=min(better_h_f);
|
wolffd@0
|
115 better_h_f_max=max(better_h_f);
|
wolffd@0
|
116
|
wolffd@0
|
117 better_half2_ind=find((period_segs==4)&(numsegs==5));
|
wolffd@0
|
118
|
wolffd@0
|
119 better_h2_f=repetitions(better_half2_ind,2:5)./(seglengths(better_half2_ind,2:5)./1000);
|
wolffd@0
|
120 better_h2_f_mean=mean(better_h2_f);
|
wolffd@0
|
121 better_h2_f_std=std(better_h2_f);
|
wolffd@0
|
122 better_h2_f_min=min(better_h2_f);
|
wolffd@0
|
123 better_h2_f_max=max(better_h2_f);
|
wolffd@0
|
124
|
wolffd@0
|
125 abweichung_f=better_h_f-repmat(better_h_f_mean,size(better_h_f,1),1);
|
wolffd@0
|
126 corrcoef(abweichung_f)
|
wolffd@0
|
127 abweichung2_f=better_h2_f-repmat(better_h2_f_mean,size(better_h2_f,1),1);
|
wolffd@0
|
128 corrcoef(abweichung2_f)
|