naturallabel

PURPOSE ^

input n = size of label

SYNOPSIS ^

function [out] = naturallabel(n)

DESCRIPTION ^

 input n = size of label
 returns a natural label idv of n carbons.
 assumes 1.1% C13

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

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

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