Scaling the values to specific range
7 次查看(过去 30 天)
显示 更早的评论
Q=[ 0.0669
0.0383
0.0029
-0.0344
-0.0554
-0.0459
-0.0316
0.0086
0.0392
0.0650
0.0698
0.0478
0.0201
-0.0134
-0.0468
-0.0583
-0.0468
-0.0229
0.0115]
I want to scale the value of Q in range [-(2^13-1),(2^13-1)]
please help
6 个评论
Walter Roberson
2012-11-21
I can't be bothered to research dwt2() to find out what the possible theoretical output ranges are for each possible class of input data. How about if you just state the value ranges and any specific encoding instructions ?
采纳的回答
Harshit
2012-11-21
D1=int16(S*32768) maps your any integer S*32768 outside the range to 32768 or for S>1 the output will be 32768(2^15) otherwise it will be round off to the nearest integer(You are assuming maximum non saturating input is 1 beyond this there will be saturation). You can see simply use max(round(2^13*S),2^13). Hope it will be fine.
13 个评论
更多回答(1 个)
Walter Roberson
2012-11-21
Qscaled = 2^13-1;
(Your permitted range consists of exactly one value, so all numbers must scale to that one value.)
2 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!