Hello,

I am trying to write script that creates an output variable that can be use as a goal function in an optimization routine for pattern synthesis.
I have a hard time putting all this together (either HFSS or Designer).
Some questions:
1. can the desired pattern be an array defined by in imported series of [angle, pattern (dB)] points?
2. how would you generate the error function which would be the maximum difference between the desired pattern and the actual pattern over a certain angular sector)?

If you have already done this, some samples would be great.