Matlab is not showing my workspace variables, even though they do exist
176 次查看(过去 30 天)
显示 更早的评论
I recently installed the R2023a version of Matlab, and after a few days of using it without any problems, the vairables in my workspace are not showing up anymore. My script runs without any errors, and I can see that the variables are indeed created when I hover my mouse over the workspace section. It seems like this is just a visual bug..
Does someone know if this is fixable? Restarting Matlab doesn't work.
8 个评论
Muhammad Tauha Ali
2023-10-9
not sure if it'll violate any confidentiality guidelines (moderators can remove this post if it does):
"Thank you for reporting this issue. I took your query into consideration. Please note that the “New Desktop for MATLAB” currently is in the Beta version and is still undergoing development. For a more stable and bug-free experience, I kindly recommend reverting back to the regular desktop environment.
As of now I am going ahead and closing this case. If you have any further questions regarding this case, feel free to reply to this email thread, I will be happy to reopen and assist you further."
Image Analyst
2023-10-9
@Nils van der Gaag from the screenshot you showed, it does not look like you are using the new desktop. If you were, there would be buttons in the titlebar in the upper right saying "Feedback" and "Stop New Desktop". I don't see that on your screenshot. Even if the new desktop had been installed previously, there would be a button saying "Try the new desktop" and I don't even see that so you never went into the Add-ons Explorer and downloaded the new desktop. There is some miscommunication going on here.
回答(1 个)
Pooja Kumari
2023-9-21
Dear Nils,
It is my understanding that you are facing issue with no variables in workspace after successful execution of script with R2023a version of MATLAB. I hope that you are facing this issue only with this MATLAB script and other scripts are working fine with all the variables being created and shown in workspace.
There are few troubleshooting steps that are given below:
- Variables in your workspace may not be visible because you are working with function files instead of script files. One important distinction between scripts and functions is that functions have their own separate workspace. This means that any calls to a function do not overwrite the values in the base workspace. You can refer to the below documentation for more details on function vs scripts: https://www.mathworks.com/help/matlab/matlab_prog/scripts-and-functions.html
- The scope of variables defined within a function is limited to that specific function. Once the function is exited, these variables vanish and are no longer accessible.
- To view the function workspace, you can add breakpoints in your code by clicking to the left of the code (next to the line number). This allows you to step through the code and examine the function workspace. You can refer to the below documentation for more information on breakpoints: https://www.mathworks.com/help/matlab/matlab_prog/debugging-process-and-features.html
- Currently, even if there are no variables in the workspace, attempting to delete variables will prompt a pop-up message stating that the variables in the workspace will be deleted.
Another troubleshooting step will be signing out of MATLAB and again signing in. If the issue persists, try re-installing MATLAB.
Regards,
Pooja Kumari
2 个评论
Dyuman Joshi
2023-9-21
You seem to have misunderstood the problem - The variables exist, are present in the workspace after the (successful) execution of the script, but there is a problem with display.
This is most likely a visual bug, as OP suspects and the best way to resolve it would be to contact Support as Stephen23 has indicated.
Yau Jack
2024-2-12
Same here, Im using online matlab and variables are not showing inn workspace.
However when mouse point on top the ariables on the script, it shows the values.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!