Alright, here's what's done:
A GPIB arbitrary waveform generator is sent the (frequency, voltage) pair in the loop body. The outer loop goes over voltages and the inner loop goes over frequencies (this minimizes the number of times the AWG has to switch which attenuator it uses, which has to do with what its voltage output is. By changing voltage less often than frequency, the relays won't switch as much.)
Two GPIB multimeters measure voltages which constitute a Vin and Vout from any type of circuit to be characterized (filter, op amp, etc). This way, you can measure the gain as related to frequency and input voltage.
It would be nice to plot gain versus frequency with lines of constant voltage level. This is done by taking the voltage f
rom the inner loop out into the body of the outer loop, with indexing on, which gives me two arrays of voltages. Their ratio is gain; the gain array is clustered with the frequency array from the inner loop. This cluster of two arrays constitutes a single xy plot. By taking this cluster out of the outer loop with indexing on, I get an array of cluster of two arrays, which is an xy multiplot, which I feed directly to an xy graph.
I would also like to generate a graph of Vout versus Vin with lines of constant frequency. I just can't figure it out though.
Hope this helps?
-Leo