It was the antivirus (Avast).
Error while evaluating Menu Callback.
31 次查看(过去 30 天)
显示 更早的评论
Hi, I can't properly save a picture. When I try to save a figure (File > Save As or Save) the following error appears: "Error while evaluating Menu Callback.". Which is weird because I could do it with the same code a week ago. I've managed to save some pictures trough the shortcut that appears on the top right corner of a figure, which allows to "Save As" or "copy image". But this doesn't work with a subplot, as it saves each subplot separately.
I tried "restoredefaultpath" and reinstalled matlab but it didn't fix it. How can I solve it?
0 个评论
采纳的回答
更多回答(1 个)
Suchitra
2022-12-6
Hello Jordi,
I can understand that you are facing an issue when trying to use File > Save, File > Save As to save a figure.
In order to resolve this issue, please refer to the following workaround:
Use the following MATLAB Command instead of using the File > Save dialog:
>> saveas('figurename.fig')
With regards to the cause of the issue, it is possible that one of the built-in toolbox functions may have become shadowed or corrupted. In order to best proceed, you can execute the following command
>> which -all filemenufcn.m
This command should return a path similar to:
C:\ProgramFiles\MATLAB\R2022b\toolbox\matlab\uitools\filemenufcn.m
If it does, try to open this file in the MATLAB Editor to see if it has become corrupted. It may also be worth renaming this file and then copying the same file from your other MATLAB installation on your notebook, in which you are not receiving this same error into this directory, rather than uninstalling and completely reinstalling MATLAB.
See also:
Hope this helps!
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Migrate GUIDE Apps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!