Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

urlwrite instruction for Matlab 2013b

1 Ansicht (letzte 30 Tage)
buer
buer am 5 Feb. 2015
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
Hi,
Can anyone explain to me how to use urlwrite function in 2013b version? With the suthentication parameters also. I want to download some files which are linked through some url with http authentication. But my problem is that I can not find a good document about the parameters for urlwrite together with authentication.
URL = 'http://csa.esac.esa.int/csa/aio/product-action';
fileName = tempname;
gzFileName = [fileName '.gz'];
[gzFileName,st] = urlwrite(URL,gzFileName, 'Authentication', 'Basic', ...
'Get', {'Username', '<username>', 'password', '<password>', ...
'DATASET_ID', 'C1_CP_WHI_ELECTRON_DENSITY', 'START_DATE', ...
'2011-11-10T18:00:00Z', 'END_DATE', '2011-11-10T21:00:00Z', ...
'NON_BROWSER', '1'});
gunzip(gzFileName);
fileNames = untar(fileName);
for iFile = 1:numel(fileNames)
disp(fileNames{iFile});
end
here is one example, but I do not know what is the meaning of all those: DATASET_ID', 'C1_CP_WHI_ELECTRON_DENSITY', 'START_DATE', ... '2011-11-10T18:00:00Z', 'END_DATE', '2011-11-10T21:00:00Z', ... 'NON_BROWSER', '1'}
Can anyone help me with this? I believe the urlwrite in 2013b has the authentication function right? Thanks in advance

Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by