Here you can find the source of array1Dto2D(int m, int n, double[] b)
public static double[][] array1Dto2D(int m, int n, double[] b)
//package com.java2s; //License from project: Open Source License public class Main { public static double[][] array1Dto2D(int m, int n, double[] b) { int i, j; double a[][]; a = new double[m][n]; for (i = 0; i < m; i++) for (j = 0; j < n; j++) a[i][j] = b[i * n + j];/*w w w.j av a2s . c o m*/ return a; } }