Effacer les filtres
Effacer les filtres

LSB algoritm in matrix

1 vue (au cours des 30 derniers jours)
Aseel H
Aseel H le 8 Juil 2012
I hide bits in some values in matrix according spesific rule
for example,
A = 10;
X = [20 5 3; 50 40 9; 11 42 15];
[x,y] = size (X);
I will hide S = [0,1,0,0,1]; using LSB in values of 'X' that greater than 'A'
[a,b] = size(S);
by function X1(x,y) = bitset(X(x,y), 1, str2num(S(a,b)));
My quesion is how i can extract the hidden bit from new matrix 'X1'?
I used bitget function, but it gave me error values not [0,1,0,0,1]

Réponse acceptée

Walter Roberson
Walter Roberson le 8 Juil 2012
char( bitget(X1(x,y), 1) + '0' )

Plus de réponses (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by