www.pudn.com > matlab.rar > rs_add.m, change:2015-04-15,size:334b


% a function to realize addition in field GF(2^5) 
% input 'a','b' are two decimal numbers range from 0 to 31 corresponding to numbers of GF(2^5) 
% output 'y' is a decimal number range from 0 to 31 corresponding to a number of GF(2^5) 
function y=rs_add(a,b)    
a1=de2bi(a,8); 
b1=de2bi(b,8); 
y1=a1+b1; 
y2=mod(y1,2); 
y=bi2de(y2);