I want to use the LM algorithm to optimize the phase of the elements on the transmission array to generate a specific field distribution in the near field - the desired field strength and phase distribution. I found that the calculation results of the code were always unable to meet the requirements of the target amplitude and phase simultaneously.