Advertisement
Guest User

Untitled

a guest
Feb 6th, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. In if ((BWGmax * (1 - exp(-K * (MCisimulate - Xm)))) > WG) { : the condition has length > 1 and only the first element will be used. Vocês podem me ajudar?
  2.  
  3.  
  4. BWGmax <- 30
  5. K <- 0.0118
  6. Xm <- 21
  7. SD <- 0.851636356306513
  8. number <- 420
  9. mean <- 28
  10. MCic <- seq(from = 200, to = 270, by = 1.7)
  11. MCisimulate <- rep(MCic, number)
  12.  
  13. WG <- c()
  14.  
  15. for(i in 1:number) { WG[i] <- ((sqrt(-2*log(runif(1, 0, 1)))*sin(2*pi*runif(1, 0, 1)))*SD)+(mean)} #mudar depois numeros por parametros
  16. BW <- 0.0223*WG^0.8944
  17. BWG <- if ((BWGmax*(1-exp(-K*(MCisimulate-Xm)))) > WG) { WG } else { (BWGmax*(1-exp(-K*(MCisimulate-Xm)))) }
  18. BWG
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement