简体   繁体   中英

Matlab Hamming Window to Vhdl 8-bit

I am going to use 128 point Hamming Window to be implemented in Vhdl. In Matlab, I obtained the values of the Hamming Window as:

h = hamming(128);

But, what Matlab gave me is varying values in the range 0 and 1. How can I convert these values into 8-bit?

If you multiply all of the results that matlab gives you by 2^8 and round down you will have successfully converted all of the numbers to 8-bit.

So for example:

bit_depth = 8;
h=hamming(128);
h_binary = floor(h*2^bit_depth);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM