From 057716d72d6130343cce59fb09fad94f9f768b74 Mon Sep 17 00:00:00 2001 From: Wei Wang Date: Fri, 9 Oct 2026 15:39:35 -0400 Subject: [PATCH] Bump to 1.36.3: a complex value inside an MCOS object shows as the number it is PR #44 pinned data-explorer-core v1.36.1, in which a complex property of an MCOS object, in a .mat file or a model workspace, shows as the number rather than [object Object]. NaN/Inf parts and integer or single classes are kept, the Property Inspector lays a complex matrix out as a matrix, and the binary and text dictionary writers write complex values MATLAB reads back as they were. --- CHANGELOG.md | 4 ++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index acf8172..2835acb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ GitHub Release. Entries before this file existed were reconstructed from those release tags. +## [1.36.3] — 2026-10-09 + +A complex value inside an MCOS object now shows as the number it is. A `Simulink.Parameter` whose Value is `3+4i` or `[1+2i 3+4i 5+6i]`, saved in a `.mat` file or an `.slx` or `.mdl` model workspace, showed `[[object Object]]` in its value cell, its Value row, each element row and the Variable Editor grid. It now reads `3+4i` and `[1+2i 3+4i 5+6i]`, spelled exactly as the extension already spells complex numbers in dictionaries and in plain MAT variables: a column is `[1+2i; 3+4i]` and a matrix is `[1+2i 3-4i; 5+6i 7-8i]`. The MAT reader kept each complex element as a pair of real and imaginary parts, and the step that turns an object's stored properties into values had no case for that pair, so it was handed on as an object and printed as one. Three related things are fixed with it. A value with a NaN or Inf part keeps its elements instead of turning into a quoted string. An integer or single complex array shows its own class, `<1x60 int16>` rather than `double`. The Property Inspector lays a complex matrix out as a matrix instead of in storage order. Two older faults in the dictionary writers, found while checking this, are fixed too. Copying or editing a complex Parameter that is not a double scalar in a binary dictionary wrote it back as a double with its shape lost: MATLAB misread 17 of 29 such entries after a plain save, and now misreads none. A complex value written into a text dictionary in its binary form was one MATLAB reads as empty: 50 of 79 entries were misread, now none. All of this was checked against MATLAB on new reference files that save complex Parameters of every shape and class, nested in structs and cells beside separately built twins, in a `.mat` file, a model workspace, and a text and a binary dictionary. The change is `data-explorer-core` 1.36.1. + ## [1.36.2] — 2026-10-09 An MCOS object saved inside a struct field or a cell element now opens as exactly what the same object is at top level, in a `.mat` file and in an `.slx` or `.mdl` model workspace alike. This covers a `Simulink.Parameter`, a `Simulink.Bus`, a `string`, and every class the extension already shows at top level. Before, such an object was a `<1x1 Simulink.Parameter>` or `<1x1 string>` leaf with no value and no properties. The object's data lives in the file's one shared MCOS store, and the reader looked that store up only for named top-level variables, by name, so a field or a cell element, which has no name of its own, was never decoded. Now every object at any depth carries its handle into the store and is decoded against it, just as a top-level one is, and its row is built by the same rule. A nested Parameter shows its Value and its property rows, a nested string shows its text, and a nested object array has its elements. Some things are unchanged on purpose. A cell's one-line value still spells each object `<1x1 Class>`, a struct's summary is still `<1x1 struct>`, a nested name still cannot be edited, and the file is still read-only. An object whose handle is damaged or names nothing stays the opaque leaf it was, and its neighbours are unaffected. This was checked against MATLAB on two new reference files. Each saves every nested object beside a top-level twin of equal value, built separately, because a `Simulink.Parameter` is a handle and a copy made by assignment would share the nested one's storage and prove nothing. All 24 pairs present identically: 22 in a `.mat` file and 2 in a model workspace. The change is `data-explorer-core` 1.36.0. This version also ships `strnum` 2.4.2, the number parser the dictionary XML reader uses. diff --git a/package-lock.json b/package-lock.json index 4731493..cdb2f34 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "simulink-data-explorer", - "version": "1.36.2", + "version": "1.36.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "simulink-data-explorer", - "version": "1.36.2", + "version": "1.36.3", "license": "BSD-3-Clause", "dependencies": { "@lit/context": "^1.1.6", diff --git a/package.json b/package.json index 01bef4b..3503c3d 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "simulink-data-explorer", "displayName": "Simulink Data Explorer", "description": "Explore Simulink models, data dictionaries, MAT-files, and projects as interactive tables and relationship trees.", - "version": "1.36.2", + "version": "1.36.3", "publisher": "mathworks", "icon": "media/icon.png", "private": true,