Q:

Deal array to function arguments

I have a function (created through the symbolic toolbox) that takes a number of scalar inputs:
scalarFn = @(a,b,c) a .* b + c

I would like to alter this function so that it instead takes a single input and deals the elements of a vector to the input arguments of the function above: 
vectorFn = @(theta) theta(1) .* theta(2) + theta(3)

I've played around with deal and or combining num2cell with {:} indexing but I haven't figured out how to compose this function yet. 
Ultimately, I want a function that takes a function handle like scalarFn (but not necessarily having only 3 arguments - quite likely more) and gives back a new function handle vectorFn that has only one input as a vector. Is there any way to do this? 

A:

As a clunky answer, I know I can do it with an eval statement: 
vectorFn = eval(['@(theta) scalarFn(' strjoin(arrayfun(@(x) ['theta(' num2str(x) ')'], 1:nargin(scalarFn), 'Uniform', false), ', ') ')']);

scalarFn(1,2,3)
vectorFn([1 2 3])

But this seems to be a particularly not robust solution. 

