existing Matlab files opening blank on M1 MacBook Pro

49 ビュー (過去 30 日間)
Kara Peterman
Kara Peterman 2022 年 9 月 13 日
回答済み: Henghua Shen 2024 年 3 月 1 日
I have an M1 Macbook Pro running both Matlab 2022a and 2020b - this issue is the same with both Matlab editions. All of my existing m-files are blank when I open them or try to run them. I can create a new m-file, save, and run it, but my previous work needs to be opened in a text editor, and copied and pasted into an m-file for it to run. This is fine for a single file, but I use software based in Matlab that has hundreds of m-files. Any help, please? I am aware of Matlab/M1 compatibility problems, but haven't seen a problem similar to mine.
  1 件のコメント
Jan
Jan 2022 年 9 月 13 日
M-files are text files. What does "blank" mean? Does opening the files in Matlab delete the text? What do you see in a text editor, if you open the same files? The procedure of opening a text file in another editor and copy&pasting it to an m-file in Matlab's editor is not meaningful. This is too magic.
My idea is that the files are not modified by opening them in the editor, but the display in the editor does not work correctly. Remember, that the editor would not work correctly without any M-files, because it uses Matlab's toolboxes also.
So please try it again: Create a text file in an editor, insert some simple commands and save it as "test.m". Now open this file in Matlab's editor and explain, what you see. Now close Matlab's editor and check in the external editor, if the file has been modified.
Are the m-files ASCII or Unicode encoded?

サインインしてコメントする。

回答 (3 件)

Arasad
Arasad 2022 年 9 月 20 日
I have had same experience with Matlab 2022a. What I noticed is that every time I restart the laptop (an M1 macbook air), the first time I run MATLAB, I will see the blank page for all the codes. If I close MATLAB and run it again, everything goes back to normal.

Aaron Kaye
Aaron Kaye 2023 年 8 月 5 日
I have the same problem with Matlab 2022a.
  1 件のコメント
Warwick
Warwick 2024 年 1 月 26 日
I have exactly this problem and the same 'fix' of closing and restarting Matlab. I use an iMac Pro. For me the problem is recent, ie, I only noticed the problem a couple of months after I updated to 2023B. The duration for startup seems a lot slower than for previous versions.

サインインしてコメントする。


Henghua Shen
Henghua Shen 2024 年 3 月 1 日
I had the same problem with 2023a. Sometimes I restarted Matlab, and it went back to normal, but not always. It usually happens when I open up by clicking the Matlab app icon. But it is normal when I open up by double clicking an any exiting m file from a folder. Dont know why but you can try:
  1. Restart Matlab; or
  2. Quite Matlab, go to your folder and double click a random m file.
Hope that helps.

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by