Matlab variable viewer does not update structure variables
I have been saving data in structures and with my version of Matlab (2025B) it does not seem to update these variables in the viewer. I am currently developing some scripts, so I am essentially just running all the code from the command line. I don’t think the code is important; it allocates matrices in a structure based on the data it reads in, and then calculates what the values are. Some psuedo code is below:
NewData=’DataSet_X’;
Data.(NewData).Value=zeros(size(X,1),2);
for I=1:length(X)
[Data.(NewData).Value(I,1),Data.(NewData).Value(I,2)] = ValueCalcFunction(Dataset X, Ith row)
end
Anyway, if I have Data open in the Variables window It shows the Value field as a matrix full of zeros even after it has been updated. If I double click the field and open just it in the variable window, it shows that it has been updated with the correct values. It would be nice to see it in the structure variable… Here is a screen capture that demonstrates what I mean:
Any ideas how can I force a refresh of the variable viewer?
I have a similar problem with the workspace not updating, but I found I can update it by pressing F5 or chosing Refresh from the menu. These options are not available in the variable viewer.
Thanks!I have been saving data in structures and with my version of Matlab (2025B) it does not seem to update these variables in the viewer. I am currently developing some scripts, so I am essentially just running all the code from the command line. I don’t think the code is important; it allocates matrices in a structure based on the data it reads in, and then calculates what the values are. Some psuedo code is below:
NewData=’DataSet_X’;
Data.(NewData).Value=zeros(size(X,1),2);
for I=1:length(X)
[Data.(NewData).Value(I,1),Data.(NewData).Value(I,2)] = ValueCalcFunction(Dataset X, Ith row)
end
Anyway, if I have Data open in the Variables window It shows the Value field as a matrix full of zeros even after it has been updated. If I double click the field and open just it in the variable window, it shows that it has been updated with the correct values. It would be nice to see it in the structure variable… Here is a screen capture that demonstrates what I mean:
Any ideas how can I force a refresh of the variable viewer?
I have a similar problem with the workspace not updating, but I found I can update it by pressing F5 or chosing Refresh from the menu. These options are not available in the variable viewer.
Thanks! I have been saving data in structures and with my version of Matlab (2025B) it does not seem to update these variables in the viewer. I am currently developing some scripts, so I am essentially just running all the code from the command line. I don’t think the code is important; it allocates matrices in a structure based on the data it reads in, and then calculates what the values are. Some psuedo code is below:
NewData=’DataSet_X’;
Data.(NewData).Value=zeros(size(X,1),2);
for I=1:length(X)
[Data.(NewData).Value(I,1),Data.(NewData).Value(I,2)] = ValueCalcFunction(Dataset X, Ith row)
end
Anyway, if I have Data open in the Variables window It shows the Value field as a matrix full of zeros even after it has been updated. If I double click the field and open just it in the variable window, it shows that it has been updated with the correct values. It would be nice to see it in the structure variable… Here is a screen capture that demonstrates what I mean:
Any ideas how can I force a refresh of the variable viewer?
I have a similar problem with the workspace not updating, but I found I can update it by pressing F5 or chosing Refresh from the menu. These options are not available in the variable viewer.
Thanks! variable viewer MATLAB Answers — New Questions









