Currency conversion using matlab script - i have no idea how to start with this
Afficher commentaires plus anciens
Write a MATLAB script to display currency conversion for US Dollar, British Pound, Euro with Singapore Dollar as the base Currency. Your output should show the equivalent values for USD, GBP, EURO for every Singapore dollar in increments of 1 dollar until 25 dollars.
Sample Output to be as follows:
SGD USD GBP EURO
1 - - -
2 - - -
3 - - -
..
..
25 - - -
Réponses (2)
SGD2X = [0.70991 0.23 5.3444 9.000]; % put the actual values here to convert from Singapore Dollars to USD, British Pound etc.
T = T = (1:25)'*SGD2X
4 commentaires
rayner lee
le 14 Sep 2015
Modifié(e) : Walter Roberson
le 14 Sep 2015
rayner lee
le 14 Sep 2015
Modifié(e) : Walter Roberson
le 14 Sep 2015
The cumsum(ones(25,1)) just generates the numbers from 1 to 25. I replaced above with 1:25. ones and cumsum are basic matlab commands. You can find out about them using help.
To display the output you can use disp. Just add a column of the values 1:25 in front of T
disp('SGD USD GBP EURO')
disp([[1:25]' T])
Catégories
En savoir plus sur Enterprise Deployment with MATLAB Production Server dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!