The stock MATLAB unwrap.m function works great for data that has a lowpass frequency response. Bandpass data is a different story. The stopbands of the bandpass data is at each extreme of the frequency range where the measurements are typically noisy. The stock unwrap algorithm begins its work using this noisy data making the results from one measurement set to the next unrelaible.
This submission addresses the problem. It comes with a set of real-world s2p measurement files and a test script to exercise the new function. A pdf document with install information is contained in the zip file.
Dick Benson (2023). Improved Bandpass Phase Unwrapping. (https://www.mathworks.com/matlabcentral/fileexchange/105095-improved-bandpass-phase-unwrapping), MATLAB Central File Exchange. 검색됨 .