oph_mul_scalar2

Description

Behaviour

It multiplies each element of the measure array by a scalar value. It can operate also with complex numbers. In case of real numbers, it multiplies each element in the input array by scalar value (real), if specified (default is 1). In case of complex numbers, it multiplies each element in the input array by the complex number with real part equal to scalar value (real) and imaginary part equal to scalar value (imaginary), if available (default is 0).

Parameters

  • input measure type: Ophidia typing. Supported types are: ‘oph_double’; ‘oph_float’; ‘oph_long’; ‘oph_int’; ‘oph_short’; ‘oph_byte’ ‘oph_complex_double’; ‘oph_complex_float’; ‘oph_complex_int’; ‘oph_complex_long’.
  • output measure type: Ophidia typing. Supported types are: ‘oph_double’; ‘oph_float’; ‘oph_long’; ‘oph_int’; ‘oph_short’; ‘oph_byte’ ‘oph_complex_double’; ‘oph_complex_float’; ‘oph_complex_int’; ‘oph_complex_long’.
  • measure: input measure.
  • scalar value (real): in case of real numbers, it is the number to be multiplied by each element of the input measure. In case of complex numbers, it is the real part of the complex number to be multiplied by each element of the input measure. Default is 1.
  • scalar value (imaginary): considered only in case of complex numbers; it is the imaginary part of the complex number to be multiplied by each element of the input measure. Default is 0.

Return type

Binary-array.

Examples

Multiply by 2+2i each element of the input array.

oph_mul_scalar2('OPH_COMPLEX_DOUBLE','OPH_COMPLEX_DOUBLE',measure,2,2)

Operation type

Simple.

Arguments

Argument name Type Mandatory Values Default Min/Max-value Min/Max-times
input measure type “oph_type” “yes” “‘oph_double’|’oph_float’ |’oph_int’|’oph_long’|’oph_short’|’oph_byte’|’oph_ complex_double’|’oph_comp lex_float’|’oph_complex_i nt’|’oph_complex_long’”     “1” / “1”
output measure type “oph_type” “yes” “‘oph_double’|’oph_float’ |’oph_int’|’oph_long’|’oph_short’|’oph_byte’|’oph_ complex_double’|’oph_comp lex_float’|’oph_complex_i nt’|’oph_complex_long’”     “1” / “1”
measure “binary-array” “yes”       “1” / “1”
scalar value (real) “double” “no”   “1”   “0” / “1”
scalar value (imaginary) “double” “no”   “0”   “0” / “1”