fixed point toolbox1
1 回表示 (過去 30 日間)
古いコメントを表示
t =
Columns 1 through 7
880.8516 868.7656 852.4141 822.5547 838.9063 823.9766 831.7969
25.1641 -13.6797 -15.3828 8.5000 13.0859 15.7422 -1.0234
-7.9844 -7.9141 13.5156 9.8281 -0.7656 -4.3828 0.9922
-2.3672 -1.0313 -2.6641 9.5469 -3.7422 -6.7656 0.7500
7.8203 5.6875 7.8203 0.7109 -5.6875 -4.9766 0
-8.4063 -5.6563 0.6094 0.0703 1.7891 -0.0703 0.1563
1.0078 -4.3672 1.2891 -0.2422 1.8438 -5.0625 -4.9922
-0.7656 -2.8203 -5.0938 -1.6016 -3.9609 0.7656 1.5391
Column 8
821.8438
7.3594
-3.6016
4.3672
-1.4219
9.0859
6.0703
0.5469
DataTypeMode: Fixed-point: binary point scaling
Signedness: Signed
WordLength: 19
FractionLength: 7
ans =
1b86d 1b262 1aa35 19b47 1a374 19bfd 19fe6 19aec 00c95 7f929 7f84f 00440 0068b 007df 7ff7d 003ae 7fc02 7fc0b 006c2 004ea 7ff9e 7fdcf 0007f 7fe33 7fed1 7ff7c 7feab 004c6 7fe21 7fc9e 00060 0022f 003e9 002d8 003e9 0005b 7fd28 7fd83 00000 7ff4a 7fbcc 7fd2c 0004e 00009 000e5 7fff7 00014 0048b 00081 7fdd1 000a5 7ffe1 000ec 7fd78 7fd81 00309 7ff9e 7fe97 7fd74 7ff33 7fe05 00062 000c5 00046
where 'ans' denote the hex values of the variable 't'
how can i quantize and remove 6d from 1b86d,62 from 1b262 ...so on ?
so that my answer look like as given below...
1b8 1b2 1aa 19b 1a3 19b 19f 19a 00c 7f9 7f8 004 006 007 7ff 003 7fc 7fc 006 004 7ff 7fd 000 7fe 7fe 7ff 7fe 004 7fe 7fc 000 002 003 002 003 000 7fd 7fd 000 7ff 7fb 7fd 000 000 000 7ff 000 004 000 7fd 000 7ff 000 7fd 7fd 003 7ff 7fe 7fd 7ff 7fe 000 000 000
0 件のコメント
回答 (2 件)
Walter Roberson
2011 年 3 月 14 日
Do the conversion to hex and discard the last two characters of each value.
2 件のコメント
Walter Roberson
2011 年 3 月 15 日
How did you get the 1b86d 1b262 and so on? The result of whatever hex conversion you did to get that was characters. Removing the last two characters of each value would then just be a matter of matrix indexing.
Hong Ye
2011 年 5 月 25 日
you can use bitsliceget function to achieve this (please note that the output data type changed). For example
t1fi =
1b86d 1b262 1aa35
DataTypeMode: Fixed-point: binary point scaling Signedness: Signed WordLength: 19 FractionLength: 7 >> bitsliceget(t1fi, 19, 9)
ans =
1b8 1b2 1aa
DataTypeMode: Fixed-point: binary point scaling Signedness: Unsigned WordLength: 11 FractionLength: 0
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Fixed-Point Designer についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!