---
title: "vSgesub(_:_:_:_:_:_:_:)"
framework: accelerate
role: symbol
role_heading: Function
path: "accelerate/vsgesub(_:_:_:_:_:_:_:)"
---

# vSgesub(_:_:_:_:_:_:_:)

Subtracts two general matrices or their transposes.

## Declaration

```swift
func vSgesub(_ height: Int32, _ width: Int32, _ a: UnsafePointer<vFloat>, _ forma: CChar, _ b: UnsafePointer<vFloat>, _ formb: CChar, _ c: UnsafeMutablePointer<vFloat>)
```

## Parameters

- `height`: Number of rows in the matrices to be subtracted; must be a multiple of 4.
- `width`: Number of columns in the matrices to be subtracted; must be a multiple of 4.
- `a`: A matrix with elements of type float. If forma = ‘N’, the matrix itself is used in the calculation and it has height rows and width columns. If forma = ‘T’, the transpose is used and a has width rows and height columns.
- `forma`: Selector with a value of ‘N’ or ‘T’.
- `b`: A matrix with elements of type float. If formb = ‘N’, the matrix itself is used in the calculation and it has height rows and width columns. If formb = ‘T’, the transpose is used and b has width rows and height columns.
- `formb`: Selector with a value of ‘N’ or ‘T’.
- `c`: Destination matrix with height rows and width columns.

## Discussion

Discussion Matrix b (or its transpose) is subtracted from matrix a (or its transpose); the result is stored in mactrix c.

## See Also

### Matrix Operations (from vectorOps.h)

- [vSgeadd(_:_:_:_:_:_:_:)](accelerate/vsgeadd(_:_:_:_:_:_:_:).md)
- [vSgemul(_:_:_:_:_:_:_:_:)](accelerate/vsgemul(_:_:_:_:_:_:_:_:).md)
- [vSgemm(_:_:_:_:_:_:_:_:_:_:_:)](accelerate/vsgemm(_:_:_:_:_:_:_:_:_:_:_:).md)
- [vSgetmi(_:_:)](accelerate/vsgetmi(_:_:).md)
- [vSgetmo(_:_:_:_:)](accelerate/vsgetmo(_:_:_:_:).md)
- [vSgevv(_:_:_:_:_:)](accelerate/vsgevv(_:_:_:_:_:).md)
