You can create all the rate constants from Excel sheet as shown below.
[~,~,raw] = xlsread('Model_Summary.xls','Rates','C3:D5') % remove empty rows in Excel sheet
for i = 1:size(raw,1)
eval(sprintf('%s = %d',raw{i,1},raw{i,2}));
end
or create a structure dynamically as below
for i=1:size(raw,1)
const.(raw{i,1}) = raw{i,2};
end
For alternative approaches to "eval" you can look at the following documentation page.
However, here rate expressions are interpreted as strings from Excel, we cannot eliminate usage of eval.
You can use eval function once, to create rate expressions as function handles and pass the cell array of function handles to the Model function
rate_expr{2} = eval(sprintf('@(k1f, k2f, k2r, A, B, C) %s', 'k2f*B - k2r*C')) % rate expression comes from Excel sheet
But you need to pass all the variables as parameters to each function handle as we do not know which parameters being used in the rate expression.