Saving and Loading variables in Matlab Drive/Matlab Online

2 views (last 30 days)
I'm working on Matlab Online with files in Matlab Drive. If I save a file
A = [1,2,3,4,5];
save vari A
vari.mat appears in the working folder on Matlab Drive.
I need to load and save files from other folders within Matlab Drive, could someone tell me how this is done please?
I've made a few basic guesses, e.g. made a subfolder testsub, but get
A = [1,2,3,4,5];
save /testsub/vari A
Error using save
Cannot create 'vari.mat' because '/testsub' does not exist.

Answers (1)

Stephen
Stephen on 25 Nov 2019
Edited: Stephen on 25 Nov 2019
Ah, after some more fiddling I realised the leading '/' should not be there.
A = [1,2,3,4,5];
save testsub/vari A
Everything works fine now.

Categories

Find more on Environment and Settings in Help Center and File Exchange

Products


Release

R2019b

Community Treasure Hunt

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

Start Hunting!