2020b/bin/maci64/MATLAB cannot run:No Info.plist file in application bundle or no NSPrincipalClass in the Info.plist file
8 次查看(过去 30 天)
显示 更早的评论
I hava an Mac mini M2.
I install Matlab 2020b in my computer.
I can run matlab in UI,but I want to run .m file for terminal.
I start /Applications/Polyspace/R2020b/bin/maci64/MATLAB, there is one problem:2023-10-13 17:24:32.474 MATLAB[12489:192643] No Info.plist file in application bundle or no NSPrincipalClass in the Info.plist file, exiting.
What can I do to salve the problem?
0 个评论
回答(1 个)
Namnendra
2024-10-23,22:15
Hi,
To run MATLAB scripts from the terminal on a Mac, especially with a version like R2020b on an M2 Mac, you might encounter some compatibility issues or configuration problems due to the differences in architecture and macOS updates. Here's a step-by-step guide to help you resolve the issue and run `.m` files from the terminal:
Step 1: Verify MATLAB Installation Path
Ensure that the MATLAB installation path is correct. Double-check that the path you are using is correct and points to a valid MATLAB installation.
Step 2: Use the MATLAB Command-Line Interface
To run MATLAB from the terminal, you should use the `matlab` command-line interface instead of directly executing the binary. Here’s how you can do it:
1. Open Terminal.
2. Navigate to the MATLAB Installation Directory:
cd /Applications/MATLAB_R2020b.app/bin
3. Run MATLAB in Command-Line Mode:
./matlab -nodisplay -nosplash -nodesktop -r "run('path/to/your/script.m');exit;"
- Replace `path/to/your/script.m` with the full path to your MATLAB script.
Step 3: Address the Info.plist Issue
The error message about the `Info.plist` file suggests there might be an issue with the application bundle configuration. However, this is usually not a concern when running MATLAB from the command line. If you continue to encounter issues:
- Reinstall MATLAB: Consider reinstalling MATLAB to ensure all files are correctly set up.
Step 4: Consider Compatibility
Consider upgrading to a version of MATLAB that supports your architecture, if possible. MATLAB R2021b and later versions offer native support for Apple Silicon.
By following these steps, you should be able to run MATLAB scripts from the terminal on your Mac.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!