Hi all,

Have got a very simple question to ask. If I am running say an SP simulation with a frequency sweep from 1 to 10GHz, over a step of 1 GHz, i.e. 10 points. Let us say I want to specify an equation to give me the value of S21 at 6 GHz, i.e. point 6, how would I do that. I know it can be done using an index, but I don' know the syntax to do that. I looked at ADS example and I found more complicated use of indexes, but what I am looking for is much simpler, and I could not find an example of how it is done.

Any help will be appreciated.

Many Thanks in Advance.

Have got a very simple question to ask. If I am running say an SP simulation with a frequency sweep from 1 to 10GHz, over a step of 1 GHz, i.e. 10 points. Let us say I want to specify an equation to give me the value of S21 at 6 GHz, i.e. point 6, how would I do that. I know it can be done using an index, but I don' know the syntax to do that. I looked at ADS example and I found more complicated use of indexes, but what I am looking for is much simpler, and I could not find an example of how it is done.

Any help will be appreciated.

Many Thanks in Advance.

Idx = find_index(freq,6GHz)

This finds the index number for the 6 GHz point.

Then you can just use this index to slice out the S-parameters at that frequncy index like this:

S_6GHz = S[Idx]

That gives you an array with all S-parameters at the 6 GHz point.

S11_6GHz = S11[Idx]

Gives you just S11 at 6 GHz.

If you want to slice out a range, then you can use two indexes like this:

Idx1 = find_index(freq,2GHz)

Idx2 = find_index(freq,5GHz)

S11_range = S11[Idx1::Idx2]

This gives you S11 between 2 and 5 GHz.

-Mats