Hi,

When I run the following section of my function, (with f a function of x, y and z), I get the following error: "Too many inputs to inline function".

syms x y z

a = inline(char(diff(f,x)));

f = matlabFunction(f);

if a(x0,y0,z0) == 0

% something happens

end

I think this is because, when you differentiate my function f wrt x, df/dx is only a function of x and z, not of y. I have checked this with a function such that when you differentiate it wrt x, it still remains a function of x, y and z, and my program works fine.

Could anyone please advise me on how to fix this, so that 'a' just ignores the fact that it's not a function of y and evaluates f at x0 and z0?

Thankyou