Hi,

I am running a monte carlo/yield analysis with s21 as my spec while varying a few components. I am currently sorting gain in ascending order using sort(). What i'd like to do is sort the component values (randomly generated Gaussian) to correspond with the gain. For example, the highest gain occurred on the xth trial and i would like to see what the value of the components are that caused that gain without having to scroll to the xth row. In other words, i'd like to sort the component values using the resorted trials as the independent variable.

Thanks,

Andrew

I am running a monte carlo/yield analysis with s21 as my spec while varying a few components. I am currently sorting gain in ascending order using sort(). What i'd like to do is sort the component values (randomly generated Gaussian) to correspond with the gain. For example, the highest gain occurred on the xth trial and i would like to see what the value of the components are that caused that gain without having to scroll to the xth row. In other words, i'd like to sort the component values using the resorted trials as the independent variable.

Thanks,

Andrew

these equations may help you:

freq_index = find_index(freq, 1GHz)

sorted_S21 = sort(db(S21[freq_index]), "descending")

max_S21_index = indep(sorted_S21)[0]

param_val_at_max_S21 = parameter[max_S21_index]