4

Anybody know if it's possible?

I'm trying to get the data by using the following code

url = 'https://cgwb.nci.nih.gov/cgi-bin/hgTracks';
params = {'org','Human','db','hg18','position','EGFR'};
urltxt = urlread(url,'get',params);

but get the error

??? Error using ==> urlread at 111
Error downloading URL. Your network connection may be down or your proxy settings improperly configured.

If I substitute https to http, it works, but I get "301 Moved Permanently" page with the above https-link.

The link in browser works properly in both cases (redirecting http request). The site does not require any authentication.

May be there are other ways than urlread?

yuk
  • 19,098
  • 13
  • 68
  • 99
  • possible duplicate of [Handling an invalid security certificate using MATLAB's urlread command](http://stackoverflow.com/questions/1638275/handling-an-invalid-security-certificate-using-matlabs-urlread-command) – Dan Jan 06 '12 at 19:55

2 Answers2

4

Sorry, I found the answer on SO:

Handling an invalid security certificate using MATLAB's urlread command

Will test and remove if needed.

UPDATE:

It really works. DO you think I should delete the question?

Community
  • 1
  • 1
yuk
  • 19,098
  • 13
  • 68
  • 99
0

An alternative solution that worked for me: (ps.: I'm using Fedora Linux, Matlab 2017a. Not sure if it will work in a simply way for windows users).

The following command line in Matlab that I used to get the data as:

AllDataURL=urlread('https://bittrex.com/api/v1.1/public/getmarketsummaries');

was successfully replaced by the following command line:

[status,AllDataURL]=dos('curl https://bittrex.com/api/v1.1/public/getmarketsummaries');

Although the result value for the variable 'status' is zero, the data into variable AllDataURL is exactly the same as the previous one when using urlread.

Hope it helps.