vendredi 6 décembre 2019

How to convert values to N bits of resolution in MATLAB?

My computer uses 32 bits of resolution as default. I'm writing a script that involves taking measurements with N bits of resolution. How do I convert the values to that?

For example, if I have a RNG that gives 1000 values

nums = randn(n,1)';

and I use an N-bit multimeter to read it, how would I get the values to reflect that?

I currently have

meas = round(nums,N-1);

but it's giving me N digits, not N bits.




Aucun commentaire:

Enregistrer un commentaire