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

조회 수: 11 (최근 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