MATLAB programming, writing a script that ask two user

Nov 15th, 2014
Price: $10 USD

Question description


Write a script in which you save the amounts 10, 15, 180, 92, 144 and 11 € to a vector.

Use the function done in the previous exercise to convert the amounts to dollars, pounds and yens (coefficients of conversion 1.2112, 0.68545 and 139.23 [1]). Print to the command window in the case of each currency a line with the mean of the converted amounts in the first column and the converted sums in the rest of the columns.


Write a script which ask program’s ”user” for the amounts should to convert (these are giving as vector). The program asks also for user to give currency (USA, Great Britain, Japan). The user gives the symbol of the currency (USD, GBP, JPY) and after that program displays to the command window initial amounts, converted amounts and mean value of converted amounts. All vectors have to displays as row vector! Use your functions in previous exercises.

Program have to identify the wrong values that user gives.E.g. currency which is not some of three

above-mentioned causes an error message and closes the program. Output example:

>> ex8

Give the amounts: [10 15 180 144 11] Give the currency (USD, GBP, JPY): USD

Initial amounts:

10 15 180 144 11

Converted amounts:

12.1120 18.1680 218.0160 174.4128 13.3232

Mean of the converted amounts: 87.2064

>> kerta3_teht8

Give the amounts: [10 15 180 144 11]

Give the currency (USD, GBP, JPY): FIM

Wrong currency!

Tutor Answer

(Top Tutor) Daniel C.
School: Boston College

Studypool has helped 1,244,100 students

Review from our student for this Answer

Nov 17th, 2014
"Thank you, Thank you, for top quality work, this is your guy!!"
Ask your homework questions. Receive quality answers!

Type your question here (or upload an image)

1828 tutors are online

Brown University

1271 Tutors

California Institute of Technology

2131 Tutors

Carnegie Mellon University

982 Tutors

Columbia University

1256 Tutors

Dartmouth University

2113 Tutors

Emory University

2279 Tutors

Harvard University

599 Tutors

Massachusetts Institute of Technology

2319 Tutors

New York University

1645 Tutors

Notre Dam University

1911 Tutors

Oklahoma University

2122 Tutors

Pennsylvania State University

932 Tutors

Princeton University

1211 Tutors

Stanford University

983 Tutors

University of California

1282 Tutors

Oxford University

123 Tutors

Yale University

2325 Tutors