petsc-3.7.1 2016-05-15
Report Typos and Errors

# MatTranspose

Computes an in-place or out-of-place transpose of a matrix.

### Synopsis

    #include "petscmat.h"
    PetscErrorCode MatTranspose(Mat mat,MatReuse reuse,Mat *B)

Collective on Mat Many br

### Input Parameter

| mat | - the matrix to transpose Many br
| reuse | - either MAT_INITIAL_MATRIX or MAT_REUSE_MATRIX Many br

### Output Parameters

B -the transpose Many br

### Notes

If you pass in &mat for B the transpose will be done in place, for example MatTranspose(mat,MAT_REUSE_MATRIX,&mat); Many br

Consider using MatCreateTranspose() instead if you only need a matrix that behaves like the transpose, but don't need the storage to be changed. Many br

Many br

### See Also

MatMultTranspose(), MatMultTransposeAdd(), MatIsTranspose(), MatReuse

Level:intermediate
Location:src/mat/interface/matrix.c
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages

### Examples

src/ksp/ksp/examples/tutorials/ex10.c.html
src/snes/examples/tutorials/ex70.c.html
src/tao/pde_constrained/examples/tutorials/parabolic.c.html
src/tao/pde_constrained/examples/tutorials/hyperbolic.c.html