MATLAB: How to use webread to download numerical data

webread

Hello. I have data in the form of .mat files in a folder in my Boxnet account. I would like to use a Matlab script to read those .mat files. One of those files is A0#.mat. When I use InternetExplorer to open my Boxnet folder I see
https://app.box.com/folder/3917214121
so I assume that is the link to the folder containing A0#.mat.
I have tried
url='https://app.box.com/folder/3917214121';
webread(url);
which does not give me an error but it also does not give any data.
I have tried
url='https://app.box.com/folder/3917214121/A0#.mat';
webread(url);
which gives me an error. Could someone suggest what I am doing incorrectly. Thanks.

Best Answer

Most likely your missing your credentials:
options = weboptions('Username','jdoe','Password','mypassword'); webread(url, options);
See https://ch.mathworks.com/help/matlab/ref/weboptions.html for more details.
Related Question