Function: Sqrt
- Updated2023-02-21
- 2 minute(s) read
Function: Sqrt
Calculates the square root of a number.
ReturnValue = Sqrt(Value)
Input Parameters
| Specifies a positive numeric value, a variable that contains a positive value, or a data channel that contains positive values. |
Return Parameters
| ReturnValue | Returns positive numeric values. |
Examples
The following example calculates the square root of a number.
| VBScript | Python |
Dim intMyResult intMyResult = Sqrt(6.5109) 'intMyResult = 2.55164652724471
The following example calculates the square root of the values in the Group1/Input data channel and saves the result in the Group2/Result data channel.
| VBScript | Python |
Call Calculate ("Ch(""Group2/Result"")= Sqrt (Ch(""Group1/Input""))")
| Note You must use the Calculate command in scripts to calculate data channels with formulas. Compute the data channels according to the syntax in the Calculator. Refer to the procedures Executing Channel Calculations in the Calculator and Assigning a Value to a Variable in the Calculator for more information about the Calculator. |
| Note You also can use the VBS function Sqr to calculate the square root of a value or of a variable in a script. |
![]() | DIAdem specifies the physical result quantity with the physical dimensions of the input quantities. The Input and Result Quantities for Quantity-Based Calculations page contains an overview of the input quantities and result quantities of all functions. Refer to the Help page Calculating Quantity-Based and Non-Quantity-Based in DIAdem for the conditions and rules for quantity-based calculations. |
Related Functions
Function: ^ | Function: Abs | Function: Ceil | Function: Deg | Function: Eex | Function: Exp | Function: Fak | Function: Floor | Function: Frac | Function: Lg | Function: Ln | Function: MaxV | Function: MinV | Function: Mod | Function: Rad | Function: Random | Function: Rnd | Function: Round | Function: RTP (Real To Part of Date) | Function: RTT (Real to Text) | Function: Sign | Function: SND | Function: Sqr | Function: Trunc | Function: VU
