MATLAB: How to load a .mat file from a URL

answersimreadloadurl

I find that I cannot load a .mat file from a URL. For example, when I try to call load() with the full URL of the attached .mat file as input, I obtain,
load('https://www.mathworks.com/matlabcentral/answers/uploaded_files/414803/tst.mat')
Error using load
Unable to read file 'https:/www.mathworks.com/matlabcentral/answers/uploaded_files/414803/tst.mat'. No such file or directory.
I have no such difficulty using imread() to read in image files from Answers URLs. Why does load() behave differently, and is there a workaround?

Best Answer

imread() documentation mentions support for URL, but load documentation does not say anything about it. I think the closest possible thing is something like this.
load(websave('myFile', 'https://www.mathworks.com/matlabcentral/answers/uploaded_files/414803/tst.mat'))
Related Question