Consider the RF Amplifier circuit shown in Figure 2. The amplifier is configured for maximum output power at 1.5MHz. In this example you will add a custom expression to a Transient Analysis to multiply the input by the output voltages.

Figure 2. RF Amplifier circuit.
- Select File»Open Samples. The Open file window opens.
- Open the file RFAmplifier.ms11.
- Select Simulate»Analyses»Transient. The Transient Analysis window opens.
- Configure the Analysis Parameters as shown in Figure 3.

Figure 3. Analysis parameters for the Transient Analysis.
Refer to the Transient Analysis tutorial for more details on how to configure the Analysis Parameters tab.
- Click on the Output tab.
You can now add an expression to analysis. The items in the Variables in circuit list display the voltage and current values which can be grouped into expressions. The output voltage is represented by the variable V(Output) and the voltage taken at the input is represented by the variable V(Input).
- Click the Add expression button. The Analysis Expression window opens.
- Select V(Output) from the Variables list and click on Copy variable to expression.
- Select the * symbol from the Functions list and click on Copy function to expression.
- Return to the Variables list and select the V(Input) variable.
- Click Copy variable to expression. The Analysis Expression window will look as shown below:

Figure 4. Analysis expression window.
- Click the OK button. You will notice the expression now appears in the Selected variables for analysis list as shown in the next figure:

Figure 5. Output expression for the Transient Analysis.
- Click Simulate. The Grapher View window opens. Results are displayed in Figure 6.

Figure 6. Transient Analysis results.