:orphan:
# MatCompositeSetScalings
Sets separate scaling factors for component matrices. 
## Synopsis
```
#include "petscmat.h" 
PetscErrorCode MatCompositeSetScalings(Mat mat, const PetscScalar *scalings)
```
Logically Collective


## Input Parameters

- ***mat      -*** the composite matrix
- ***scalings -*** array of scaling factors with scalings[i] being factor of i-th matrix, for i in [0, nmat)





## See Also
 [](ch_matrices), `Mat`, `MatScale()`, `MatDiagonalScale()`, `MATCOMPOSITE`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/impls/composite/mcomposite.c.html#MatCompositeSetScalings">src/mat/impls/composite/mcomposite.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/tutorials/ex9.c.html">src/mat/tutorials/ex9.c</A><BR>

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/impls/composite/mcomposite.c.html#MatCompositeSetScalings_Composite">MatCompositeSetScalings_Composite in src/mat/impls/composite/mcomposite.c</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/mat/impls/composite/mcomposite.c)


[Index of all Mat routines](index.md)  
[Table of Contents for all manual pages](/manualpages/index.md)  
[Index of all manual pages](/manualpages/singleindex.md)  
