Minimizing a multivariable function with different vector length?

86 Views Asked by At

Assume that I want to minimize a function to a measured vector.

$$V_{min} = \sum_{n = 0, k = 0}^{N, K}{|T_n - f(t_n, p_n, r_k)|}$$

Where $T_n, t_n, p_n$ has the same vector length $N$, but not $r_k$ which as the length $K$.

Is there any way to find the best $r_k$ then in MATLAB?

Rigth now I using two for-loops. But it mus be a function for this?