least significant bit process
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
i have matrix A, let we say, A=rand(1,256). A contains important coefficient. Because A is decimal like 0.xxxx, so i make B=A*10000. i make this for i can process dec2bin because i don't know how to convert decimal number to biner. after i get B, C=dec2bin(B,18).
i got 256 binary value of C. i want process LSB every value of C, every bits in c(1,1) until C(1,256) @18 bits must change the least significant bit of F.
example, C(1,1) = 001101010101010111 embedded into least bits of F, from F(1,1) until F(1,18) and until the whole C
A=rand(1,256);
B=A*10000;
C=dec2bin(B,18);
D=rand(1,5000);
E=F*10000;
F=dec2bin(E,18);
0 comentarios
Respuestas (1)
Walter Roberson
el 17 de Mzo. de 2013
B = fix(A * 10000);
lsb = mod(B,2);
changed_B = B - lsb + newlsb;
where newlsb is the values (0 or 1) of the new bits.
2 comentarios
Walter Roberson
el 17 de Mzo. de 2013
B is not going to have 18 bits worth of integer information per location. The maximum value for any B entry is going to be 1 * 10000, and that will have about 13.28771238 bits of integer information.
Ver también
Categorías
Más información sobre Data Type Conversion en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!