Question

wnite a MMATLAR CODE unction myq ra coain to generate R bit as gray cocding matrx
Using matlab
0 0
Add a comment Improve this question Transcribed image text
Answer #1

r=rand(10,10)>0.5;
%the variable 'r' contains the binary values in terms of a matrix currently its a 100x100 binary matrix %you can provide your own matrix of any size but remember it will calculate the gray code row wise
g(:,1) = r(:,1); %assign the 1st element of each row to the resultant 'g', as it is.
for i = 2:size(r,2)
     g(:,i) = xor( r(:,i-1), r(:,i) );%processing as per the procedure
end

Add a comment
Know the answer?
Add Answer to:
Using matlab wnite a MMATLAR CODE unction myq ra coain to generate R bit as gray...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT