I am using the urlread() function to read in information from an url. How could I include variables into the url address?
I have latitude and longitude information which I would like to implement into the url when looping through the data. Here some example for lat and long variables:
lat=43.2;long=116.3
I tried using num2str(variablename) but this failed with an unexpected matlab error
alt= urlread('http://api.geonames.org/astergdem?lat=' num2string(lat) '&lng=' num2str(long) '&username=test12345&style=full&type=JSON')
Best Answer