You seem to have some basic misunderstandings using anonymous functions and its syntax.
For what I think you want to do, you basically have three options:
Option 1
Define the function with 10 input parameters and provide 10 input values - OR expand an input array as comma separated list using {:} which requires an intermediate num2cell step:
func1 = @(a,b,c,d,e,f,g,h,i,j) a + b + c + d + e + f + g + h + i + j
p = num2cell(p)
answer = func1(p{:})
Option 2
Define the function with 1 input parameters using an array with 10 values and provide this array:
func2 = @(p) p(1) + p(2) + p(3) + p(4) + p(5) + p(6) + p(7) + p(8) + p(9) + p(10)
answer = func2(p)
Option 3
The last option to use varargin is really case dependent and could look like:
func3 = @(varargin) [varargin{:}]
p = num2cell(p)
answer = func3(p{:})