From: Simon on
I tried the example from
http://www.mathworks.com/access/helpdesk/help/toolbox/symbolic/matlabfunction.html :

syms x y z t
r = x^2 + y^2 + z^2;
matlabFunction(r, 'file', 'new_function',...
'vars', {t, [x y z]});

I always get the failure:
??? Error using ==> sym.matlabFunction at 55
Argument 'vars' failed validation isvars.

if i use
matlabFunction(r, 'file', 'new_function',...
'vars', [t, [x y z]]);
all is fine.
From: Alan Weiss on
Simon wrote:
> I tried the example from
> http://www.mathworks.com/access/helpdesk/help/toolbox/symbolic/matlabfunction.html :
>
> syms x y z t
> r = x^2 + y^2 + z^2;
> matlabFunction(r, 'file', 'new_function',...
> 'vars', {t, [x y z]});
>
> I always get the failure:
> ??? Error using ==> sym.matlabFunction at 55
> Argument 'vars' failed validation isvars.
>
> if i use
> matlabFunction(r, 'file', 'new_function',...
> 'vars', [t, [x y z]]);
> all is fine.

This happens in R2008b of MATLAB, but not R2009a or later.

Alan Weiss
MATLAB mathematical toolbox documentation
 | 
Pages: 1
Prev: DCC GARCH forecasting code
Next: java and simulink