Advertisement
Guest User

Untitled

a guest
Sep 25th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. > as.numeric(names(sort(x1[nam,1],decreasing=TRUE)))
  2. [1] 6 16 17 2 32 31 12
  3.  
  4. > nam
  5. 2 6 12 16 17 31 32
  6.  
  7. v1=c( 0.061 , 0.278 , 0.163 , 0.089 , 0.133 , 0.46 , 0.072 , 0.116 , 0.044 , 0.042 , 0.079 , 0.194 , 0.002 , 0.124 , 0.061 , 0.349 , 0.344 , 0.213 , 0.043 , 0.21 , 0.13 , 0.004 , 0.001 , 0.221 , 0.015 , 0.088 , 0.089 , 0.122 , 0.045 , 0.013 , 0.261 , 0.264 , 0.052 )
  8. v2= c( 0.054 , 0.287 , 0.158 , 0.085 , 0.123 , 0.451 , 0.068 , 0.11 , 0.049 , 0.037 , 0.09 , 0.206 , 0.009 , 0.131 , 0.073 , 0.339 , 0.342 , 0.221 , 0.048 , 0.216 , 0.138 , 0.006 , 0.008 , 0.227 , 0.008 , 0.095 , 0.094 , 0.128 , 0.037 , 0.008 , 0.253 , 0.258 , 0.058 )
  9. v3= c( 0.052 , 0.318 , 0.21 , 0.177 , 0.032 , 0.348 , 0.147 , 0.113 , 0.001 , 0.076 , 0.18 , 0.304 , 0.099 , 0.107 , 0.179 , 0.228 , 0.416 , 0.217 , 0.005 , 0.158 , 0.154 , 0.064 , 0.008 , 0.189 , 0.027 , 0.087 , 0.044 , 0.077 , 0.004 , 0.056 , 0.2 , 0.247 , 0.002 )
  10. n=33
  11. p=10
  12. x1=matrix(c(rep(v1,5),rep(v2,16),rep(v3,3)),n,n-p+1 )
  13. dimnames(x1) <- list(1:n, paste("m=", p:n, sep = ""))
  14. th.Res =0.25
  15. ma <- apply(abs(x1), 1, max, na.rm = TRUE)
  16. nam <- which(ma > th.Res)
  17. if (lnam <- length(nam)) {
  18. namOrder=as.numeric(names(sort(x1[nam,1],decreasing=TRUE)))
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement