I am using symbolic toolbox to generate a matlab function. But the number of input to the generated function is varying with the number of objects that I need (e.g., number of switches). For 2 and 3 switches the generated function look likes this :
y = fun(a1,a2,b1,b2)
y = fun(a1,a2,a3,b1,b2,b3)
In the script using this function I establish vectors of these parameters:
a = [a1 a2 ...]
What I want is to either call the generated function directly or make a wrapper function, so that I do not need to change the call statement when I change the number of switches. To complicate this problem even more, these variables are ACADO variables. That means that matrix and element-wise operation is not allowed (i.e., all math operation must be done with scalars, and equations in symbolic toolbox must be written for scalars).