Commit | Line | Data |
---|---|---|
39046da6 BA |
1 | selectionindice = function(phi, seuil) |
2 | { | |
3 | dim_phi = dim(phi) | |
4 | pp = dim_phi[1] | |
5 | m = dim_phi[2] | |
6 | ||
7 | A = matrix(0, pp, m) | |
8 | B = matrix(0, pp, m) | |
9 | ||
10 | for(j in 1:pp) | |
11 | { | |
12 | cpt1 = 0 | |
13 | cpt2 = 0 | |
14 | for(mm in 1:m) | |
15 | { | |
16 | if(max(phi[j,mm,]) > seuil) | |
17 | { | |
18 | cpt1 = cpt1 + 1 | |
19 | A[j,cpt] = mm | |
20 | } else | |
21 | { | |
22 | cpt2 = cpt2+1 | |
23 | B[j, cpt2] = mm | |
24 | } | |
25 | } | |
26 | } | |
27 | return (list(A,B)) | |
28 | } |