index.js
function mean(x) {
	let result = [];
	
	for(let c = 0; c<x[0].length; c++){
		result.push(0);
	}
	
	for (let r = 0; r < x.length; r++) {
		for(let c = 0; c<x[r].length; c++){
			result[c] += x[r][c];
		}
	}
	
	for(let c = 0; c<x[0].length; c++){
		result[c] /= x.length;
	}
	
	return result;
}
function mean(x) {
	let result = [];
	
	for(let c = 0; c<x[0].length; c++){
		result.push(0);
	}
	
	for (let r = 0; r < x.length; r++) {
		for(let c = 0; c<x[r].length; c++){
			result[c] += x[r][c];
		}
	}
	
	for(let c = 0; c<x[0].length; c++){
		result[c] /= x.length;
	}
	
	return result;
}
function mean ( x ) { let result = [ ] ; for ( let c = 0 ; c < x [ 0 ] . length ; c ++ ) { result . push ( 0 ) ; } for ( let r = 0 ; r < x . length ; r ++ ) { for ( let c = 0 ; c < x [ r ] . length ; c ++ ) { result [ c ] += x [ r ] [ c ] ; } } for ( let c = 0 ; c < x [ 0 ] . length ; c ++ ) { result [ c ] /= x . length ; } return result ; }
Returns the mean of each column in the provided matrix.
@param {number[][]} x - Two-dimensional matrix.
Returns the mean of each column in the provided matrix .