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

6 visualizaciones (últimos 30 días)
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?

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 20 de Oct. de 2025 a las 0:00
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)

Más respuestas (0)

Categorías

Más información sobre Data Import and Network Parameters en Help Center y File Exchange.

Productos


Versión

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by