Skip to content

Skip MATLAB's internal groups like #sigstream# when listing v7.3 variables - #282

Open
Enricoftw wants to merge 1 commit into
JuliaIO:masterfrom
Enricoftw:skip-internal-groups
Open

Enricoftw wants to merge 1 commit into
JuliaIO:masterfrom
Enricoftw:skip-internal-groups

Conversation

@Enricoftw

Copy link
Copy Markdown

Simulink saves logged signals in a top-level group /#sigstream# of a v7.3 file. The group has no MATLAB_class attribute, so keys listed it as a variable and matread failed for the whole file, with the same error as in #128 (there for #subsystem#):

HDF5.API.H5Error: Error opening attribute MATLAB_class for object /#sigstream#

For example in MATLAB R2022b or R2026b:

ds = Simulink.SimulationData.Dataset;
ds = ds.addElement(timeseries((1:3)', (0:2)', "Name", "x"));
after = 42;
save("ds.mat", "ds", "after", "-v7.3")

#129 added #subsystem# to the filter in keys. MATLAB variable names start with a letter, so this PR skips every top-level name that starts with #. With it, ds reads as a MatlabOpaque and after as 42. The test adds a #sigstream# group to a file written by matwrite, so it needs no Simulink file.

Fix, test and text by Claude Code (Claude Opus 5.5), reviewed by Codex (GPT-6 Astra) and a second Claude Code (Claude Opus 5.5) session.

…ables

Simulink saves logged signals in a v7.3 group /#sigstream# that has no
MATLAB_class attribute. keys() listed it as a variable, so matread failed
for the whole file. Variable names start with a letter, so every top-level
name starting with # is internal.

Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant