フィルターのクリア

how to map decimal values to rom , such that they return unsigned fixed point numbers respectively?

1 回表示 (過去 30 日間)
hello guys, how to i map my decimal values eg(0.456,0.568,0.635,0.785.....) to my rom memory such that they output 400mhz,500mhz,600mhz,700mhz respectively using matlab sys generator???
  3 件のコメント
Star Strider
Star Strider 2016 年 8 月 29 日
Sandeep Kumar’s later Comment is reproduced here for clarification:
‘those left hand side are my input values , the right hand side are the values that should stored in the rom.’
Sandeep Kumar
Sandeep Kumar 2016 年 8 月 29 日
編集済み: Sandeep Kumar 2016 年 8 月 29 日
kk sir i have a control logic. the output of a control logic are those decimal numbers to the left hand side(1st column), they should be passed to a rom block , inside the rom 640:56:790 values are stored sequentially. when ever the decimal value comes eg: like 4 it should output 745 as the output.

サインインしてコメントする。

採用された回答

Walter Roberson
Walter Roberson 2016 年 8 月 29 日
1D lookup table would seem appropriate.
Are the input values always going to be exact matches for one of the values on the left? For example, 27.1666 and 27.1668 would never be inputs, but 27.1667 encoded in decimal could be an input? Or are the inputs encoded using the Fixed Point Toolbox in binary?
  2 件のコメント
Walter Roberson
Walter Roberson 2016 年 8 月 29 日
When I graph the data, second column as x and first column as y, it looks to me as if the 27.1667 entry for 655 Hz is perhaps incorrect and would be expected to be between 30 and 31 instead.
Overall you can get a not bad fit of the possibility that y = a*x^b + c, where x is the first column and y is the second column. The 124 would be the biggest outlier for that, but is not so bad. The 27.1667 presents a bit of a kink to it though.
Sandeep Kumar
Sandeep Kumar 2016 年 8 月 30 日
my problem got solved , just multiplying it with a factor of 512 to the decimal values , will be give all diff address values , storing freq in those address has worked for me thanku all.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by