I have a FEX (file exchange) submission that does exactly that: it finds the path of the function, so you make your code portable.
change to user directory
5 次查看(过去 30 天)
显示 更早的评论
I have two computers, one with the "user directory" of "C:\Users\fullname\Documents" and the other "C:\Users\partialname\OneDrive\Documents". I have a script that I would like to be able to run on both computers, and not need to change. I would like to be able to have the script save my output file to "C:\Users\somename\Documents\GMAT", but since the user directory is different for both computers, I'm not sure how to do this without changing my user directories.
Suggestions? Thoughts?
Thanks.
0 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Search Path 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!