Why does the "sparameters" function produce an error in MATLAB R2023b when importing data from a Touchstone file that includes a degree symbol?

6 ビュー (過去 30 日間)
When I use the "sparameters" function from the RF Toolbox to open a Touchstone file that contains a degree symbol (°, ASCII 176) I get the following error:
 
Error using ibisTschk2
Invalid character '�'.
Error in rf.file.touchstone.Data
Error in rf.internal.netparams.AllParameters/readRFFile
Error in rf.internal.netparams.AllParameters
Error in rf.internal.netparams.ScatteringParameters
Error in sparameters (line 91)
            obj = obj@rf.internal.netparams.ScatteringParameters(varargin{:});
The degree symbol is usually present in Touchstone files produced by "Anritsu MS4644B Network Analyzer". This issue was not present in MATLAB R2023a and started in MATLAB R2023b.
Why does the "sparameters" function produce an error in MATLAB R2023b when importing data from a Touchstone file that includes a degree symbol?

採用された回答

MathWorks Support Team
MathWorks Support Team 2025 年 10 月 20 日
The error occurs because, starting in MATLAB R2023b, RF Toolbox (including "sparameters") uses the official Touchstone 2.0 reader and enforces the standard. Per the standard, degree symbols are not allowed in the comment section, so files containing them trigger an error.
Starting in MATLAB R2024b, you can use "setTouchstoneReader" to configure the Touchstone 2.0 reader to ignore invalid characters in comments. 
setTouchstoneReader('IgnoreComments',false)

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Import and Network Parameters についてさらに検索

製品


リリース

R2024a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by