# MatAYPX

Computes Y = a*Y + X.

### Synopsis

    #include "petscmat.h"
    PetscErrorCode PETSCMAT_DLLEXPORT MatAYPX(Mat Y,PetscScalar a,Mat X,MatStructure str)

Collective on Mat

### Input Parameters

| a | - the PetscScalar multiplier
| Y | - the first matrix
| X | - the second matrix
| str | - either SAME_NONZERO_PATTERN, DIFFERENT_NONZERO_PATTERN or SUBSET_NONZERO_PATTERN

### Notes

Will only be efficient if one has the SAME_NONZERO_PATTERN or SUBSET_NONZERO_PATTERN

### Keywords

matrix, add

### See Also

MatAXPY()

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