input n = size of label returns a natural label idv of n carbons. assumes 1.1% C13
0001 function [out] = naturallabel(n) 0002 % input n = size of label 0003 % returns a natural label idv of n carbons. 0004 % assumes 1.1% C13 0005 if n <= 0 0006 out = 1; 0007 return; 0008 end 0009 0010 out = zeros(2^n,1); 0011 for i = 0:(2^n-1) 0012 t = dec2bin(i,n); 0013 c13 = sum(t-48); % subtract 48 for the '0' offset. 0014 c12 = n-c13; 0015 out(i+1) = .989^c12*.011^c13; 0016 end