When I ran your algorithm, I found a number of times where it just didn¡¯t tune. Most of those were where it missed finding any hills in a wide plains of 9.99 SWRs. ?Please excuse the geographical analogy, but I find it helpful.?
When I browsed around using the test framework, for some test points of frequency and complex impedance, the hills were quite large, other times they were fairly small. That¡¯s why I added the feature to try to find the best points to search for a hill in the plains.?
I¡¯ll admit the search might not be perfect, there might be some stacking of the values due to the math of the regular complex impedances and the frequencies having common fundamentals. So these test values might not entirely reflect reality ?
Any luck in getting my code to run? A little experience with it might be more instructive than I can easily explain.?
Also, feel free to contact me via email or message if you¡¯d like.?