PageRenderTime 22ms CodeModel.GetById 18ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/dvbt/trunk/debug/mm/ml/forge_gcalc/int2hexchar.m

http://github.com/zaqwes8811/decoder-reed-solomon
Objective C | 24 lines | 24 code | 0 blank | 0 comment | 8 complexity | 8435c9a5a8201731d9e83cb34632b128 MD5 | raw file
 1function [cTmp, j] = int2hexchar(A, smesh) 
 2cTmp = [];
 3cTmp = [cTmp int2hex4(smesh) ' : '];
 4	for j = 1:length(A)
 5		if A(j) < hex2dec('10') 
 6			cTmp = [cTmp '0' dec2hex(A(j))];
 7		else
 8			cTmp = [cTmp dec2hex(A(j))];
 9		end
10		% ??????????????
11		if (mod(j, 1)) == 0
12			cTmp = [cTmp ' '];	
13		end
14		if (mod(j, 4)) == 0
15			cTmp = [cTmp ' '];	
16		end
17		%
18		if mod(j, 32) == 0
19            cTmp = [cTmp  ';'];
20			cTmp = [cTmp  char(10)];
21            cTmp = [cTmp int2hex4(smesh+j) ' : '];
22    	end
23    end
24    cTmp = [cTmp  ';'];