Blocks ====== Every block of this toolkit, from its catalog. math ---- .. list-table:: :header-rows: 1 * - Block - Type - What it does * - :doc:`Absolute ` - ``absolute`` - Computes the absolute value of u. * - :doc:`Angle Diff ` - ``angle_diff`` - Computes the shortest signed difference (a - b) normalized to [-pi, pi]. * - :doc:`Arithmetic ` - ``arithmetic`` - Applies an arithmetic operator to a and b. * - :doc:`Atan2 ` - ``atan2`` - Computes the 2-argument arctangent atan2(y, x) in radians. * - :doc:`Bessel ` - ``bessel`` - The Bessel function of u, of the chosen kind and order (Boost.Math). * - :doc:`Clamp ` - ``clamp`` - Restricts u between min and max. * - :doc:`Deadband ` - ``deadband`` - Suppresses signals within [-width, +width]. * - :doc:`Deg to Rad ` - ``deg_to_rad`` - Converts an angle from degrees to radians. * - :doc:`Determinant ` - ``determinant`` - The determinant of a square matrix. * - :doc:`Distribution ` - ``distribution`` - The pdf, cdf or quantile of a normal, uniform or exponential distribution (Boost.Math). * - :doc:`Error Function ` - ``erf`` - The error function of u (Boost.Math). * - :doc:`Gain ` - ``gain`` - Multiplies its input by k. * - :doc:`Gamma ` - ``gamma`` - The gamma, log-gamma or digamma function of u (Boost.Math). * - :doc:`Hypot ` - ``hypot`` - Computes the Euclidean distance hypot(a, b) = sqrt(a\*a + b\*b). * - :doc:`Identity ` - ``identity`` - The n × n identity matrix: ones on the diagonal, zeros elsewhere. * - :doc:`Inverse ` - ``inverse`` - The inverse of a square, non-singular matrix (A⁻¹). * - :doc:`Lerp ` - ``lerp`` - Linearly interpolates between a and b by factor t. * - :doc:`Map Range ` - ``map_range`` - Maps u linearly from [in\_min, in\_max] to [out\_min, out\_max]. * - :doc:`Matrix ` - ``matrix_constant`` - A matrix from its rows: "1 2; 3 4" (commas, newlines and brackets are welcome). * - :doc:`Min / Max ` - ``min_max`` - Selects the minimum or maximum among inputs. * - :doc:`Matrix multiply ` - ``multiply`` - The matrix product A·B; the inner dimensions must agree. * - :doc:`Rad to Deg ` - ``rad_to_deg`` - Converts an angle from radians to degrees. * - :doc:`Random Boolean ` - ``random_boolean`` - Generates random booleans with probability p. * - :doc:`Random Number ` - ``random_number`` - Generates random numbers between min and max. * - :doc:`Round ` - ``round`` - Rounds u to an integer using the chosen mode. * - :doc:`Saturation ` - ``saturation`` - Keeps its input between a minimum and a maximum. * - :doc:`Scale matrix ` - ``scale`` - Multiplies every element of a matrix by k. * - :doc:`Size ` - ``size`` - The shape of a matrix: how many rows and columns it has. * - :doc:`Solve ` - ``solve`` - Solves A·x = B for x (MATLAB's A \\ B); A must be square and non-singular. * - :doc:`Sum ` - ``sum`` - Adds a and b. * - :doc:`Threshold ` - ``threshold`` - 1 above a level, else 0. * - :doc:`Transpose ` - ``transpose`` - The transpose of a matrix: rows become columns. * - :doc:`Wrap Angle ` - ``wrap_angle`` - Wraps an angle in radians into the range [-pi, pi]. group ----- .. list-table:: :header-rows: 1 * - Block - Type - What it does * - :doc:`In ` - ``inport`` - An input of the subsystem or story it is in: a port on the group's block outside, named by name, and its value here. * - :doc:`Out ` - ``outport`` - An output of the subsystem or story it is in: what is wired to it leaves by a port on the group's block outside, named by name. .. toctree:: :hidden: absolute angle_diff arithmetic atan2 bessel clamp deadband deg_to_rad determinant distribution erf gain gamma hypot identity inverse lerp map_range matrix_constant min_max multiply rad_to_deg random_boolean random_number round saturation scale size solve sum threshold transpose wrap_angle inport outport