Matlab's read.m produces an error in version 2025a
2 views (last 30 days)
Show older comments
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 Comments
Paul
on 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
on 4 Jun 2025
Edited: dpb
on 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.
Answers (0)
See Also
Categories
Find more on Characters and Strings in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!