Thanks Andrew,
I wasn't able to figure out either method you suggested. For the first one, when I double click on the waveform it brings up the "Trace Attributes" form which doesn't have any SKILL expressions. Also, I can't see any way to save an Ocean script from the ADE.
But, your suggestions pointed me to a different solution. If you pull up the result browser and select the stb-stb category it has the loopGain result, if you select this and then hit the calculator button you get:
getData("loopGain" ?result "stb-stb")
Then to plot the data just stick this in a phase() or db20() function:
phase(getData("loopGain" ?result "stb-stb"))
db20(getData("loopGain" ?result "stb-stb"))
To get the phase margin, phase margin frequency, gain margin and gain margin frequency use:
getData("phaseMargin" ?result "stb-margin.stb")
getData("phaseMarginFreq" ?result "stb-margin.stb")
getData("gainMargin" ?result "stb-margin.stb")
getData("gainMarginFreq" ?result "stb-margin.stb")
Thanks for the getting me unstuck.
Dave Broughton