Java Matrix Transpose transposeMatrix(double[][] m)

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

Description

transpose Matrix

License

Open Source License

Declaration

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

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static double[][] transposeMatrix(double[][] m) {
        double[][] temp = new double[m[0].length][m.length];
        for (int i = 0; i < m.length; i++)
            for (int j = 0; j < m[0].length; j++)
                temp[j][i] = m[i][j];/*from   w ww.ja va2s  .  co  m*/

        return temp;
    }
}

Related

  1. transpose3x3Matrix(float[][] m)
  2. transpose4x4(float m[], float t[])
  3. transpose_image(Object source, int width, int height)
  4. transposeBooleanMatrix(boolean[][] matrix)
  5. transposeInPlace(float[] src)
  6. transposeMatrix(double[][] m)
  7. transposeMatrix(final float[] msrc, final int msrc_offset, final float[] mres, final int mres_offset)
  8. transposeMatrix3x3(float[] result, float[] m)
  9. transposematrixmultiply(final double[][] A, final double[] b)