Saving and Loading variables in Matlab Drive/Matlab Online

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)

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

Products

Release

R2019b

Asked:

on 25 Nov 2019

Edited:

on 25 Nov 2019

Community Treasure Hunt

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

Start Hunting!