Accessing files from my Matlab Drive in a script
23 views (last 30 days)
Show older comments
Hello everybody,
I´m looking for a solution to access .m-files, that I saved in my Matlab Drive linked to my account. I want to load these files into my workspace on my desktop computer. Is there a command, that addresses files in my Matlab Drive?
I appreciate your support. Thanks in advance.
0 Comments
Accepted Answer
Gareth
on 17 Aug 2020
Hi Christian,
While there is not currently a command to access your MATLAB Drive content programatically, if you have installed MATLAB Drive Connector then you can use the MATLAB Drive button to cd into your MATLAB Drive folder inside of MATLAB. You can then use those files as you would any other local files and load them into your workspace etc.
I hope that helps,
Best wishes,
Gareth
3 Comments
Gareth
on 17 Aug 2020
Hi Christian,
We do listen to customer feedback and this is something that has been requested previously - if/when I can provide an update on this functionality I will reply to this Answer to let you know.
Thanks and best wishes,
Gareth.
More Answers (1)
Gareth
on 11 Mar 2021
Hi Christian, MATLAB R2021a has now been released and we've added a new matlabdrive function which when combined with fullfile can be used to construct a path to files in your MATLAB Drive that will work in both MATLAB Online and on the desktop.
For example, a script could now call something like the following, and it should work equally well so long as MATLAB Drive is available on that computer:
A = imread(fullfile(matlabdrive, 'Images', 'BinaryImages', 'binary1.bmp'));
Hopefully this helps towards the usecase that you were inquiring about!
Best wishes,
Gareth
0 Comments
See Also
Categories
Find more on Introduction to Installation and Licensing in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!