Thanks Tudor for writing this very handy toolbox, I have been using it for about a year while I am in grad school and it has saved me a lots of time with its robust handling of Touchstone files (much better and faster than the script I wrote myself) and the handling of singularities in network parameter conversion.
One comment, I have made an alternate version of the s2a and a2s functions which take an optional Zo parameter so that you can have non-unit Zo. In this version Bnew=B*Zo and Cnew=C/Zo in s2a, and it simply reverses these factors in a2s. It is easy to do this external to the function for Y and Z parameters since you just multiply or divide by Zo, but a bit messier to do for ABCD parameters. If you like I can send you the files.
22 Jun 2010
Convert colour names (blue,teal,pale green) into RGB triplets.
Author: Ben Mitch
Thanks for writing this, I find it very handy and use it often when I write scripts to plot various measurement data.
The function is magnificent.
Except that sometimes for me a problem arises when exporting!
In loglog plot, the label ticks are not written correctly, I mean they should be something like 10^(2), but they are 100.
Strange is that this only happens for y-axis and x-axis is fine!
I looked it up a lot in the internet, but could not find the solution. I have not been able to resolve it by changing tickmode to manual or etc.
Any other solution?
20 Oct 2014
Exports figures nicely to a number of vector & bitmap formats.
I encountered a similar issue as described by Emma. However, it works fine for linewidths>0.75 pt, but for smaller linewidths the lines seem to be set to 0.75 pt when exporting, i.e. when exporting lines of 0.5 pt width (or any value<0.75), it will export them as 0.75 pt, when exporting lines with 1 pt width (or any value >0.75 pt) it exports them with the correct width.
The problem does not occur in R2014a.