Matlab's read.m produces an error in version 2025a

2 Ansichten (letzte 30 Tage)
Jeffrey
Jeffrey am 31 Mai 2025
Bearbeitet: dpb am 8 Jun. 2025
I am using a library that has worked seamlessly on previous Matlab versions, up to and including 2024b
At some point, this library calls C:\Program Files\MATLAB\R2025a\toolbox\matlab\graphics\graphics\+matlab\+graphics\+internal\+figfile\@FigFile\read.m
In this function, a variable verString (1x1 string) is created on line 85, using regexp(). Then, read.m attempts to convert it to double using str2double() on line 87. However, str2double will not accept a string array as input. (Inputing foo = "string"; str2double(foo); on the Matlab2025a command line produces an identical error.)
There is no possibility to rewrite this function (it is read-only), so any help with what to do would be greatly appreciated.
  9 Kommentare
Paul
Paul am 4 Jun. 2025
Should vendors get in the habit of putting all (most? some?) of their functions in a namespace and calling them as such to avoid the shadowing problem?
dpb
dpb am 4 Jun. 2025
Bearbeitet: dpb am 8 Jun. 2025
Since that is now an option, probably, at least for new code. There is the issue of backwards compatibility, though, if supporting older releases.
Forth had variable and function (aka "words") dictionaries "way back when" which is where I first met the concept...most handy, indeed.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Characters and Strings finden Sie in Help Center und File Exchange

Produkte


Version

R2025a

Community Treasure Hunt

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

Start Hunting!

Translated by