Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- N = 100 #100000000
- a = rnorm(N)
- b = rnorm(N)
- # Vektorizovany pristup
- c = a * b
- # Devektorizovany pristup
- d = rep(NA, N)
- for(i in 1:N) {
- d[i] = a[i] * b[i]
- }
- a1 = c(1,2,3,4,5)
- a2 = c(6,7,8,9,10)
- a3 = a1 * a2
- a3
- a4 = a1 + a2
- a4
- a5 = a1 > a2
- a5
- a6 = !a1
- a6
Advertisement
Add Comment
Please, Sign In to add comment