The ADE calculator, in addition to being useful for plotting and manipulating simulation results, can also be used for general purpose graphing and plotting of formulas and/or tabular data, by making use of the "xval" and "table" (or "getAsciiWave" in Wavescan) functions.

The "table" (in AWD) or "getAsciiWave" (in Wavescan) function allows you to read the contents of any two-column ascii table (textfile) as a waveform, and then plot it and/or use it to manipulate other data. Simply fill in the popup form with the address of the text file, and tell it how many lines in the file you want it to skip (if any - useful it there are header lines in the file). For the "table" function in AWD, you also need to choose a name for this new "waveform", which will appear in the waveform viewer when you plot it. (The getAsciiWave function assigns a name automatically.) Then hit the plot button of the calculator, and your waveform will be plotted.

The "xval" function allows plotting mathematical functions as a function of either time or frequency, where "xval" becomes the independent variable of the expression being plotted. To use this you must have first run either a transient simulation (if you are plotting vs time) or an ac simulation (if plotting vs frequency), otherwise "xval" does not know what to use as the independent variable. Also "xval" needs an argument - it does not matter what it is so long as it is something that varies with either time or frequency.

So, the step by step procedure for plotting a formula would be: a) Run a quick sim; b) capture any time-varying or frequency-varying waveform in the calculator (it does not matter which waveform you use, "xval" just needs it to determine the x-axis values); c) build your mathematical function in the calculator using xval(*your_captured_waveform*) as the independent variable; d) plot your expression.

I have attached an example where this was used with AWD - note the math equation being plotted and how this was built up in the calculator (see the label for the waveform plot).

- Hugh

*Originally posted in cdnusers.org by*

**Hugh**