MATLAB: How to connect to onedrive

one drive

when using different pc's my matlab has issues connecting to one drive, partly driven by the fact that the path name is different due to teh pc I am using.

Best Answer

It's hard to determine from your question what exactly you are trying to do. But this may help:
Using the line
hostname = char(getHostName(java.net.InetAddress.getLocalHost));
you can get the name of your PC. I have my startup.m in a onedrive folder. And by using this line I can set paths accordingly in my startup script and perform various different startup tasks depending on which PC I am using.