SHARE
TWEET

Untitled

a guest Oct 23rd, 2019 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. macierz_zgodnosci <- function(rotation) {
  2.   square <- function(x) { return (x^2) }
  3.   squares_matrix <- apply(rotation, c(1,2), square)
  4.   for (row in 1:nrow(squares_matrix)) {
  5.     for (col in 2:ncol(squares_matrix)) {
  6.       squares_matrix[row, col] <- squares_matrix[row, col] + squares_matrix[row, col - 1]
  7.     }
  8.   }
  9.  
  10.   return(squares_matrix)
  11. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top