Problem 8046. Gold/Silver Standard
Pursuant to the Gold Standard problem, suppose that you have data for silver rather than gold to make an assessment regarding historical currency values. Historical data for the silver-to-gold ratio is also available from Measuring Worth.
For this problem, you will be provided with a historical year (HY) and a historical value (HV) in dollars. The function template includes data from the previously mentioned site for the value (in dollars) of an ounce of gold (GV), in addition to the silver-to-gold ratio, from 1791 to 2014. Write a function to determine the current value (CV) in dollars assuming that the gold standard must be converted to the silver standard to accurately convert between years. Round the result to two decimal places. If HY is outside of the historical data range, return NaN.
As an example, with HY = 2000 and HV = 1000:
- GV(HY=2000) = $280.10
- N = 1000/280.10 = 3.57 (ounces of gold)
- SR(HY=2000) = 55.96
- NS = 55.96*3.57 = 199.79 (ounces of silver)
- NG = 199.79/66.38 = 3.01 (current ounces of gold) [SR(2014) = 66.38]
- CV = 3.01*1270 (current $/ounce of gold) = $3822.36.
Solution Stats
Problem Comments
Solution Comments
Show commentsGroup

Cody Problems in Japanese
- 16 Problems
- 272 Finishers
- ベクトルのスケーリング
- 二つのベクトルの要素ごとの積の平均を計算しよう
- 2倍してみよう - ここからスタート!
- ベクトル [1 2 3 4 5 6 7 8 9 10] の作成
- サイコロを作ろう
- チェッカーボードを作ろう
- ベクトルの値が増加しているかを調べよう
- 二乗になっている数を見つけよう
- 二つのベクトルの要素ごとの積の平均を計算しよう
- 行列内の素数の平均をとろう
- ゼロでない要素が一番多い行を探そう
- 特定の値がベクトル内に含まれているかを確認するコードを書こう
- NaN (欠損値) が含まれている行を削除しよう
- テレビのサイズを求めてみよう
- 英語の文章内の母音を取り除くコードを書きましょう。
- 対称で、n*2n のサイズの行列を作成しましょう
- 文字列の最初と最後の文字だけ抜き出しましょう。
Problem Recent Solvers47
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!