public double[] std(double x[][]) {
        if (x.length <= 1) {
            return null;
        }

        int n = x[0].length;
        double mean[] = new double[n];
        double var[] = new double[n];
        for (int i = 0; i < n; i++) {
            mean[i] = 0;
            for (int j = 0; j < x.length; j++) {
                mean[i] += x[j][i];
            }
            mean[i] /= n;
        }
        for (int i = 0; i < n; i++) {
            var[i] = 0;
            for (int j = 0; j < x.length; j++) {
                var[i] += (mean[i] - x[j][i]) * (mean[i] - x[j][i]);
            }
            var[i] = Math.sqrt(var[i]) / (n - 1);
        }
        return var;
    }