Currency conversion using matlab script - i have no idea how to start with this
Mostrar comentarios más antiguos
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 - - -
Respuestas (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 comentarios
rayner lee
el 14 de Sept. de 2015
Editada: Walter Roberson
el 14 de Sept. de 2015
Walter Roberson
el 14 de Sept. de 2015
rayner lee
el 14 de Sept. de 2015
Editada: Walter Roberson
el 14 de Sept. de 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])
Categorías
Más información sobre Enterprise Deployment with MATLAB Production Server en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!