How to evaluate a cell array of handle functions
Show older comments
Hi guys,
Sorry, I am quite new in Matlab and I am having a really hard time to get what I want. I developed a cell array of handle functions. The script looks like:
N=4
C=cell(1,N);
syms n Ea R r pO2 T t A
Arrhenious=sym(zeros(1,N));
for k=1:N
Arrhenious(k)=1-(1/((1/(n-1)+(exp(-Ea/(R*T))*A*t*((pO2)^r)))*(n-1))^(1/(n-1)));
C{k}=matlabFunction(Arrhenious(k));
end
Now, I need to evaluate each handle function for the syms parameters. There is not problem for n Ea r R PO2 and A as they are constant and the same for each handle function. The problem is that each handle function depends on Temperature and time. Each handle function must be evaluated at different temperature for the whole range of time. Therefore, T and t are vectors. These are T=[798 823 908 943] a temperature for each function handle and t=60:60:53940.
How could I evaluate each handle function in the cell array for the require temperatures and times with the rest of the parameters as constants?
Thank you in advance.
Best regards,
Cruz
Accepted Answer
More Answers (1)
Categories
Find more on Conversion Between Symbolic and Numeric in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!