Matlab online problems - doesn't use startup.m, ignores setpath, forgets preferences

4 次查看(过去 30 天)
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 个评论
Les Beckham
Les Beckham 2023-11-7
移动:Cris LaPierre 2023-11-7
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.
WTxnitz
WTxnitz 2023-11-7
I should have been clearer: I meant - hit the button in the upper right corner, with the tooltip "save path for future"
which is what I hit after making edits.
deleting old bad paths
adding new paths
changing order
hit the button in the upper right corner, with the tooltip "save path for future"
I assume the callback includes savepath.
it's the new (correct) version
Immediately check - new version
check later in same session - new version
logout/in - back to old version; no new path, bad old paths; edits gone
desktop versions, neither Mac nor PC, do not do this. They operate as expected.
It is a problem with matlab online. Whether accessed by Mac or PC - same issue

请先登录,再进行评论。

采纳的回答

Sanchari
Sanchari 2023-11-16
编辑:Sanchari 2023-11-16
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:
  1. 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.
  2. 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.
  3. 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:
3. “Setup Search Path in MATLAB Online”
I hope this information is helpful to you!

更多回答(0 个)

类别

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

标签

产品


版本

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by