Well I found a solution. Sorry for not syntaxing my question right. With the solution you will understand my question too :)
r = func(x)
r=0;
for i=0:20
r= r+ sum(x(i));
end
so func is a function with 20 unknown variables x(1) ... x(20)
I am very new to Matlab and such programms generally. I want to implement such a function:
y = sum(Xi) where i = 1 to 20
Xi are unknown parameters. how can I do this to Matlab?
Of course i can do: y= x1 + x2 + x3... but it's ridiculous.
My final target is to minimize such a function with...