# fixed.complexQlessQRMatrixSolveFixedpointTypes

Determine fixed-point types for matrix solution of complex-valued
*A*'*A**X*=*B* using QR
decomposition

## Syntax

## Description

computes fixed-point types for the matrix solution of complex-valued `T`

= fixed.complexQlessQRMatrixSolveFixedpointTypes(`m`

,`n`

,`max_abs_A`

,`max_abs_B`

,`precisionBits`

)*A*'*A**X*=*B* using QR decomposition. *T* is returned as a struct with
fields that specify fixed-point types for *A* and *B* that
guarantee no overflow will occur in the QR algorithm transforming *A*
in-place into upper-triangular *R*, where *Q**R*=*A* is the QR decomposition of *X*, and *X*
such that there is a low probability of overflow.

specifies the standard deviation of the additive random noise in `T`

= fixed.complexQlessQRMatrixSolveFixedpointTypes(___,`noiseStandardDeviation`

)*A*.
`noiseStandardDeviation`

is an optional parameter. If not supplied or
empty, then the default value is used.

specifies the probability that the estimate of the lower bound for the smallest singular
value of `T`

= fixed.complexQlessQRMatrixSolveFixedpointTypes(___,`p_s`

)*A* is larger than the actual smallest singular value of the
matrix. `p_s`

is an optional parameter. If not supplied or empty, then
the default value is used.

computes fixed-point types for the matrix solution of complex-valued `T`

= fixed.complexQlessQRMatrixSolveFixedpointTypes(___,`regularizationParameter`

)

$${\left[\begin{array}{c}\lambda {I}_{n}\\ A\end{array}\right]}^{\text{'}}\cdot \left[\begin{array}{c}\lambda {I}_{n}\\ A\end{array}\right]X=\left({\lambda}^{2}{I}_{n}+A\text{'}A\right)X=B$$

where *λ* is the
`regularizationParameter`

, *A* is an
*m*-by-*n* matrix, and
*I _{n}* =

`eye(`*n*)

. `regularizationParameter`

is an optional parameter. If not supplied or empty, then the default value is used.

specifies the maximum word length of the fixed-point types.
`T`

= fixed.complexQlessQRMatrixSolveFixedpointTypes(___,`maxWordLength`

)`maxWordLenth`

is an optional parameter. If not supplied or empty, then
the default value is used.

## Examples

## Input Arguments

## Output Arguments

## Tips

Use `fixed.complexQlessQRMatrixSolveFixedpointTypes`

to compute
fixed-point types for the inputs of these functions and blocks.

## Algorithms

The fixed-point type for *A* is computed using `fixed.qlessqrFixedpointTypes`

. The required number of integer bits to prevent
overflow is derived from the following bound on the growth of *R* [1]. The
required number of integer bits is added to the number of bits of precision,
`precisionBits`

, of the input, plus one for the sign bit, plus one bit
for intermediate CORDIC gain of approximately 1.6468 [2].

The elements of *R* are bounded in magnitude by

$$\mathrm{max}\left(\left|R(:)\right|\right)\le \sqrt{m}\mathrm{max}\left(\left|A(:)\right|\right).$$

Matrix *B* is not transformed, so it does not need any additional growth
bits.

The elements of *X*=*R*\(*R*'\*B*) are bounded in magnitude by

$$\mathrm{max}\left(\left|X(:)\right|\right)\le \frac{n\cdot \mathrm{max}\left(\left|B(:)\right|\right)}{\mathrm{min}{\left(\text{svd}\left(A\right)\right)}^{2}}.$$

Computing the singular value decomposition to derive the above bound on
*X* is more computationally intensive than the entire matrix solve, so the
`fixed.complexSingularValueLowerBound`

function is used to estimate a bound on
`min(svd(A))`

.

## References

[2] Voler, Jack E. "The CORDIC
Trigonometric Computing Technique." *IRE Transactions on Electronic
Computers* EC-8 (1959): 330-334.

## Version History

**Introduced in R2021b**