Creating Math Functions

To create a new math function:

  1. Click Utilities > Math Functions > New button to create a new math function.
  2. In the Name box, type the name of your math function.
  3. Use the Data, Functions, and Operators menus to construct your math expression. A constant value can also be typed or use data registers (see Using math on data registers below). Also, see the Math Function Reference for more information.
  4. Click the Check Syntax button to locate and fix any syntax errors.
  5. In the Description box, type a description for the math function.
  6. Click the Apply button to update any traces that use the math function.

The VSA stores math functions as files with the same name as the math function with the extension .MTHX. The math functions are located in this directory:

%USERPROFILE%\My Documents\Keysight\89600B VSA\MathFunctions

Entering constants in math functions

In addition to buttons and selections from lists, constant values can also be typed to be used in calculations.

For example, to double the amplitude of a spectrum, create the following math function to double the amplitude. (Note that the Log Mag trace format is used, the amplitude increases by 6 dB.)

  1. Click Data > Spectrum to insert the text Data('Spectrum1') into the math expression.

  2. Click Operators > * to insert an asterisk (*) to signify multiplication.

  3. Type the number 2.

The resulting expression should be Data('Spectrum1') * 2

Enter complex numbers in the format (x + jy) where x is the real part and y is the imaginary part. For example, to shift the phase of a time-domain signal 90 degrees, multiply the signal by j1:

  1. Click Data > Inst Main Time to insert the text Data('InstMainTime1') into the math expression.

  2. Click Operators > * to insert an asterisk (*) to signify multiplication.

  3. Type the complex number "j1".

The resulting expression should be Data('Inst Main Time1') * j1

Using math on data registers

Data registers that contain information are listed in the Math Functions > Data menu. Empty data registers are not listed. To perform math operations on a data register, first copy or recall data into the register.

See Also

About Math Functions

Manipulating Math Functions

Math Functions Dialog Box

Math Trace Data (Trace Data)