PageRenderTime 26ms CodeModel.GetById 21ms app.highlight 4ms RepoModel.GetById 0ms app.codeStats 0ms

/drm/trunk/release/mm/ml/xxbm/src/int2hexchar_save.m

http://github.com/zaqwes8811/decoder-reed-solomon
Objective C | 35 lines | 34 code | 1 blank | 0 comment | 11 complexity | df2e681469a7829bdc40aed721b64da4 MD5 | raw file
 1function Aw = int2hexchar_save(QW, step)
 2for i = 1:step
 3cTmp = [];
 4A = QW{1,i};
 5k = i;
 6dflag = length(A)/16;
 7flag = floor(dflag);
 8u = 0;
 9	for j = 1:length(A)
10		if A(j) < hex2dec('10') 
11			cTmp = [cTmp '0' dec2hex(A(j))];
12		else
13			cTmp = [cTmp dec2hex(A(j))];
14		end
15		% ??????????????
16		if (mod(j, 1)) == 0
17			cTmp = [cTmp ' '];	
18		end
19		%if (mod(j, 4)) == 0
20		%	cTmp = [cTmp ' '];	
21		%end
22		%
23        if (u == flag) && (dflag-flag ~= 0)
24           Aw(1,k) = {cTmp}; 
25        end
26		if mod(j, 16) == 0 
27			%cTmp = [cTmp  char(10)];
28            Aw(1,k) = {cTmp};
29            cTmp = [];
30            k = k+step;
31            u = u+1;
32        end
33        
34	end
35 end