The measurement of impedance is a fundamental requirement in electrical engineering. Over the last century, countless techniques have been developed to accomplish this and all have their pros, cons, and sweet spots.
The Vector Network Analyzer is inherently capable of measuring impedance (Z) since it can measure the reflection coefficient (Gamma), and impedance can then be computed from the reflection coefficient. One shortcoming of using a VNA (at least the ones I have!) is the format of the results is somewhat limited. In the world of impedance, there are almost as many formats for displaying Z as there are ways to measure it. This application (vna_s11.m) is an extension of the formats typically available in a vector network analyzer.
Dick Benson (2020). VNA Impedance Measurement (https://www.mathworks.com/matlabcentral/fileexchange/68910-vna-impedance-measurement), MATLAB Central File Exchange. Retrieved .
Color changes, SWR-Q-Return Loss selection.