Why do I get the "Unrecognized function or variable" error in MATLAB R2025a when I edit the value of a structure array in Variables editor?

Why do I get the "Unrecognized function or variable" error in MATLAB R2025a when I edit the value of a structure array in Variables editor? Steps to reproduce the issue:
1. Create a structure array:
A(1).name = "a";
A(2).name = "b";
A(1).val = 11;
A(2).val = 20;
2. Double-click "A" from Workspace to open it in tabular view from the Variables Editor.
3. Double-click the value of "a" and replace it with "aa" within the Variables Editor.
4. The change cannot be made. An error window pops up with text Unrecognized function or variable 'aa'.

 Accepted Answer

The error occurred because when modifying the string "a" to "aa" from the Variables editor, not including the double quotes in the modification makes it a character array.
Please include the quotes ("") around "aa" when making the modification from the Variables editor, as shown in the figure below.
The development team has been notified of this behavior when editing structure data values. They will consider it in the future MATLAB releases or updates. 

More Answers (0)

Products

Release

R2025a

Community Treasure Hunt

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

Start Hunting!