The way you've described the problem, it sounds like whatever is invoking theinline object will pass 2 inputs into df, but when you construct theinline in the second case it only detects one variable in the expression (usingsymvar) and soinline will construct an object that only accepts one input.
Istrongly suggest that you usestr2func to create an anonymous function instead of creating aninline object.
Best Answer