Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. function Mean(polia){
  2.  
  3. var value = [];
  4.  
  5. polia[0].forEach((x,i) => {value.push(0)});
  6.  
  7. polia.forEach((x,i) => {x.forEach((y, j) => {value[j] += y})});
  8.  
  9. value.forEach((x,i) => {value[i] = x / polia.length});
  10.  
  11. return value;
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement