Skip to content

sqrt_matrixSqrtMatrixSqrtMatrixsqrt_matrixT_sqrt_matrix🔗

Short description🔗

sqrt_matrixSqrtMatrixSqrtMatrixsqrt_matrixT_sqrt_matrix — Compute the square root values of the elements of a matrix.

Signature🔗

sqrt_matrix( matrix MatrixID, out matrix MatrixSqrtID )void SqrtMatrix( const HTuple& MatrixID, HTuple* MatrixSqrtID )static void HOperatorSet.SqrtMatrix( HTuple matrixID, out HTuple matrixSqrtID )def sqrt_matrix( matrix_id: HHandle ) -> HHandle

Herror T_sqrt_matrix( const Htuple MatrixID, Htuple* MatrixSqrtID )

HMatrix HMatrix::SqrtMatrix( ) const

HMatrix HMatrix.SqrtMatrix( )

Description🔗

The operator sqrt_matrixSqrtMatrix computes the square root values of all elements of the input Matrix given by the matrix handle MatrixIDmatrixIDmatrix_id. A new matrix MatrixSqrt is generated with the result. The operator returns the matrix handle MatrixSqrtIDmatrixSqrtIDmatrix_sqrt_id of the matrix MatrixSqrt. Access to the elements of the matrix is possible e.g., with the operator get_full_matrixGetFullMatrix. The formula for the calculation of the result is:

\[\begin{eqnarray*} \texttt{MatrixSqrt}_{ij} \quad = \quad \sqrt{\texttt{Matrix}_{ij}}. \end{eqnarray*}\]

Example:

\[\begin{eqnarray*} \texttt{Matrix} = \left[ \begin{array}{rrr} 3.0 & 1.0 & 2.0 \\ 5.0 & 7.0 & 2.0 \\ 9.0 & 4.0 & 1.0 \end{array} \right] \qquad \to \qquad \texttt{MatrixSqrt} = \left[ \begin{array}{rrr} 1.7321 & 1.0000 & 1.4142 \\ 2.2361 & 2.6458 & 1.4142 \\ 3.0000 & 2.0000 & 1.0000 \end{array} \right] \end{eqnarray*}\]

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

Parameters🔗

MatrixIDmatrixIDmatrix_id (input_control) matrix → (handle)HTuple (HHandle)HMatrix, HTuple (IntPtr)HHandleHtuple (handle)

Matrix handle of the input matrix.

MatrixSqrtIDmatrixSqrtIDmatrix_sqrt_id (output_control) matrix → (handle)HTuple (HHandle)HMatrix, HTuple (IntPtr)HHandleHtuple (handle)

Matrix handle with the square root values of the input matrix.

Result🔗

If the parameters are valid, the operator sqrt_matrixSqrtMatrix returns the value 2 (H_MSG_TRUE). If necessary, an exception is raised.

Combinations with other operators🔗

Combinations

Possible predecessors

create_matrixCreateMatrix

Possible successors

get_full_matrixGetFullMatrix, get_value_matrixGetValueMatrix

Alternatives

sqrt_matrix_modSqrtMatrixMod

See also

pow_scalar_element_matrixPowScalarElementMatrix, pow_scalar_element_matrix_modPowScalarElementMatrixMod

Module🔗

Foundation