How can I obtain the current exchange rate for two given currencies in matlab?
I tried this one, however it seems that the web service is no longer available.
Is there another easy way of obtaining the up-to-date currency exchange rates through a web service in matlab?
Build a local class from a currency conversion web service using CREATECLASSFROMWSDL. You can then use the web service’s operations to do the conversion using the class methods. One currency conversion web service (there are many) is available at http://www.webservicex.net/CurrencyConvertor.asmx?WSDL. Here’s an example of its use:
>> converter = createClassFromWsdl('http://www.webservicex.net/CurrencyConvertor.asmx?WSDL'); Retrieving document at 'http://www.webservicex.net/CurrencyConvertor.asmx?WSDL' >> converter = CurrencyConvertor endpoint: 'http://www.webservicex.net/CurrencyConvertor.asmx' wsdl: 'http://www.webservicex.net/CurrencyConvertor.asmx?WSDL' >> ConversionRate(converter, 'CAD', 'EUR') ans = 0.7059 >> ConversionRate(converter, 'USD', 'CAD') ans = 0.953Note that ConversionRate returns a char array, i.e. you still have to convert the result with str2double if you want to do calculations with the exchange rate.
A list of the currency abbreviations is available at http://www.webservicex.net/ws/wsdetails.aspx?wsid=10.