getRandGlc

PURPOSE ^

SYNOPSIS ^

function [xGlc] =getRandGlc()

DESCRIPTION ^

 Wing Choi 1/20/08

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [xGlc] = ...
0002     getRandGlc()
0003 
0004 %
0005 % Wing Choi 1/20/08
0006 
0007 % generate random glucose in isotopomer format
0008 
0009 %if(length(glucose) ~= 8)
0010 %    warn('bad input');
0011 %end
0012 %glucose(9) = 1-sum(glucose);
0013 %if(any(glucose < 0))
0014 %    warn('bad input');
0015 %end
0016 
0017 glucose = rand(8,1);
0018 glucose = glucose/sum(glucose);
0019 
0020 % glc 1-6 = carbon 1-6
0021 % glc 7 = carbon 1+2 (really 5 and 6)
0022 % glc 8 = unlabeled
0023 % glc 9 = fully labeled
0024 glc = zeros(64,9);
0025 glc(1+1,1) = 1;
0026 glc(2+1,2) = 1;
0027 glc(4+1,3) = 1;
0028 glc(8+1,4) = 1;
0029 glc(16+1,5) = 1;
0030 glc(32+1,6) = 1;
0031 glc(32+16+1,7) = 1;
0032 glc(0+1,8) = 1;
0033 glc(63+1,9) = 1;
0034 
0035 
0036 xGlc = zeros(64,1);
0037 for i = 1:8
0038     xGlc = xGlc + glucose(i)*glc(:,i);
0039 end
0040 
0041 %xGlc = idv2cdv(6)*xGlc;
0042 
0043 
0044 return
0045 end

Generated on Thu 21-Jun-2012 15:39:23 by m2html © 2003