MATLAB: Faster way than “subs” function for Symbolic substitution

for loopsymbolic

I want to ask if there is a faster way for Symbolic substitution than using the Function "subs"
It took with me for substituting 0.12 second and I am running that in a for loop because I have every time new variables to use and the for loop is running around 300000. So is there faster way?

Best Answer

I found the Answer
using matlabFunction. It takes a longer time to generate a file but,after that things will be faster. And as long as I want to substitute in the for loop so this one is incredibly faster. It took 0.0008 sec
Related Question