| Contents | Index |
You can convert data values from numeric to hexadecimal or binary according to a quantizer object's specifications.
Use
num2bin to convert data to binary
num2hex to convert data to hexadecimal
hex2num to convert hexadecimal data to numeric
bin2num to convert binary data to numeric
For example,
q = quantizer([3 2]);
x = [0.75 -0.25
0.50 -0.50
0.25 -0.75
0 -1 ];
b = num2bin(q,x)
b =
011
010
001
000
111
110
101
100
produces all two's complement fractional representations of 3-bit fixed-point numbers.
![]() | Quantizing Data with quantizer Objects | quantizer Object Functions | ![]() |

Learn how to apply early verification to your development process through these technical resources.
How much time do you spend on testing to ensure implementation meets system-level requirements?
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |