Hi Randall,
I understand that you are encountering an error when running the startup.m file on your Mac. Since you are unable to use command line tools, I assume that you recently upgraded your macOS to Big Sur, Monterey, or Ventura. Otherwise, you may not have the necessary privileges to access protected directories and files on your device.
To resolve this issue, you can try the following approaches:
- Ensure that your macOS meets the system requirements for the version of MATLAB you are trying to launch. If you have recently updated to a new macOS version, you might need to update to a newer version of MATLAB as well.
- Make sure that full disk access is enabled for both the terminal and MATLAB:
1. Go to the Apple menu > System Settings > Privacy & Security.
2. Find and select "Full Disk Access" from the list.
3. Find MATLAB and the terminal in the list and toggle the button to the "on" position.
4. Now try command line tools and run the MATLAB.
- Verify that the startup.m file is in the user path of MATLAB. The default userpath folder for the Mac platform is $home/Documents/MATLAB.
- Check if the startup.m file has proper file permissions.
For more details you can refer the following MATLAB documentation
- https://in.mathworks.com/help/matlab/ref/startup.html
- https://in.mathworks.com/help/matlab/ref/userpath.html
- https://in.mathworks.com/support/requirements/previous-releases.html
Also, this MATLAB Answers thread could be helpful.
If the issue persists, please contact MATHWORKS support by visiting the following link:
Hope this helps.
Best Regards,
Dinesh Reddy Gatla.