Java Matrix to Vector matrix2Vector(double[][] m)

Here you can find the source of matrix2Vector(double[][] m)

Description

matrix Vector

License

Apache License

Declaration

public static double[] matrix2Vector(double[][] m) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static double[] matrix2Vector(double[][] m) {
        double[] v = new double[m.length];
        for (int i = 0; i < v.length; i++) {
            v[i] = m[i][0];//from  w  w  w . j  a  v  a  2 s . c  om
        }
        return v;
    }
}

Related

  1. matrix2vector(int[][] matrix)
  2. matrixToVectorArray(int M, int N, float[][] a, float[] b)
  3. matrixToVectorArray(int M, int N, float[][] a, float[] b)
  4. matrixVector(double[][] w, double[] v)