Filter löschen
Filter löschen

Explain the following encoding code

1 Ansicht (letzte 30 Tage)
Nitesh
Nitesh am 6 Mär. 2014
Beantwortet: Walter Roberson am 6 Mär. 2014
Below code is used in encoding where B=pic(:,:,1) is matrix of image.
for v v = 1:1000 % This is the encoder.
for uu = 1:7
if msgmat(vv,uu)==1;
if rem(B(idx(uu+7*(vv-1))),2)==0
B(idx(uu+7*(vv-1))) = B(idx(uu+7*(vv-1)))+1;
end
elseif rem(B(idx(uu+7*(vv-1))),2)==1
B(idx(uu+7*(vv-1))) = B(idx(uu+7*(vv-1)))-1;
end
end
Please tell me whats going on in above code ???? v v and uu are variables

Antworten (1)

Walter Roberson
Walter Roberson am 6 Mär. 2014
The code sets the bottom bit of a location in B to be the same as the value of msgmat() at a location.
idx(uu+7*(vv-1)) would work out the same as idx(uu,vv) provided that idx had 7 rows.

Kategorien

Mehr zu Standard File Formats finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by