public Matrix getBlock(int fromRaw, int toRaw, int fromColumn, int toColumn) {
        if(data == null || fromRaw > toRaw || fromColumn > toColumn || toRaw-1 > data.length || toColumn-1 > data[0].length) {
            System.out.println("error in Matrix.getBlock - can't get such block");
            return null;
        }
        int n = toRaw-fromRaw, m = toColumn-fromColumn;
        double [][]a = new double[n][m];
        for (int i = 0; i < n; i++)
            for (int j = 0; j < m; j++)
                a[i][j] = data[fromRaw+i][fromColumn+j];
        return new Matrix(a);
    }