Matlab online problems - doesn't use startup.m, ignores setpath, forgets preferences
2 views (last 30 days)
Show older comments
online has mutliple problems. I'll be glad if anyone has solutions
doesn't run startup.m from intial location
unlike desktop, preferences > general does not have a option to set startup folder
using setpath or pathtool is ignored. it has old bad paths(mine) and forgets new paths added
forgets prefs changes after quit
4 Comments
Les Beckham
on 7 Nov 2023
Moved: Cris LaPierre
on 7 Nov 2023
The command to save the search path is savepath (all one word). save path (two words) will save your workspace variables to a file called path.mat.
Accepted Answer
Sanchari
on 16 Nov 2023
Edited: Sanchari
on 16 Nov 2023
Hello WTxnitz,
I understand that you want to utilize the "startup.m" file in MATLAB Online and save changes to the "setpath" and "preferences" for future sessions in MATLAB Online.
To achieve this, you can follow these steps:
- Verify MATLAB version: Check the version of MATLAB Online by typing "ver" in the command window. Ensure that you are using the latest version as the "setpath" and "preferences" options are fully functional in this version.
- Unlike the desktop version, MATLAB Online does not provide an option to set the initial working folder. Create a startup folder with the startup file within it. Then, click on "Set Path" in the Environment section and select the path to the startup folder.
- Finally, click on the "Save Path for future sessions" button located in the top-right corner of the window.
By setting and saving the startup folder for future sessions, you should be able to run the "startup.m" file from the command window. Ensure that your current working directory is the one containing the "startup.m" file. You can also right-click on the current folder and select "Add to path > Selected folders and subfolders".
For more information on setting the startup folder locally, you can refer to the MathWorks documentation: https://www.mathworks.com/help/matlab/matlab_env/matlab-startup-folder.html
Additionally, you can find helpful information on MATLAB Answers:
1. “Problem with Startup.m” https://www.mathworks.com/support/search.html/answers/13083-startup-m-problem.html?fq%5B%5D=asset_type_name:answer&fq%5B%5D=category:matlab/startup-and-shutdown&page=1
2. “Startup.m not found” https://www.mathworks.com/support/search.html/answers/454005-startup-m-not-found-in-local-folder.html?fq%5B%5D=asset_type_name:answer&fq%5B%5D=category:matlab/startup-and-shutdown&page=1
3. “Setup Search Path in MATLAB Online”
I hope this information is helpful to you!
More Answers (0)
See Also
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!