MATLAB 2022b .m files stopped opening on MacOS

4 次查看(过去 30 天)
When I try to open any .m, I just get a blank screen on the editor. But very interestingly, I can still open and edit .mlx files. I tried restarting MATLAB and my laptop, but that didn't help either :(
I'm on a MacOS Monterey with MATLAB 2022b.

回答(1 个)

Dvarkesh Madhu
Dvarkesh Madhu 2023-3-7
Hi Shamoil,
1. Are you trying to open the .m file as a live script?
In that case, save .m as a UTF-8 format, or save it as a live script code(.MLX).
2. Or are you connecting to MATLAB via remote desktop applications? In that case, try starting MATLAB using the "-cefdisablegpu" flag from your system command prompt:
matlab -cefdisablegpu
3. Another thing you can try is to update your graphics driver and see if that resolves the issue.
4. Or start MATLAB using the”-softwareopengl” flag from your system command prompt:
matlab -softwareopengl
5. If the above does not help, you can try to restore the default path and rehash toolbox cache using "Holy Trinity".
Implementing the following steps will help restore the toolbox cache.
  • Before modifying the search path, it is important to take a backup of your 'pathdef.m' file, which can be located by using the command:
which -all pathdef
  • Before proceeding, ensure that you make a safe copy of the file by copying it to a folder outside of your MATLAB path.
  • After taking the backup, please execute the following commands in the MATLAB Command Window to restore the default MATLAB search path and rehash the toolbox cache.
restoredefaultpath
rehash toolboxcache
sl_refresh_customizations
  • After this step, kindly check if the issue occurs again. If the issue is resolved, then you may want to save the new MATLAB search path by executing the following command:
savepath
If the issue still persists, feel free to contact our Technical Support team for further assistance.
Hope this helps!

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

标签

产品


版本

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by