0
$\begingroup$

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?

$\endgroup$
  • $\begingroup$ Why would it make a difference of any sort anyways? In the end, you must be able to describe your objective as $f(x)$, and $x$ is simply all your unknown variables (I am assuming your are using an optimization solver such as fmincon etc) $\endgroup$ – Johan Löfberg May 24 '18 at 11:10
  • $\begingroup$ @JohanLöfberg Hi! I don't use any optimazation solver. I have some measurement data and I don't know how to minmize if the measurement data is few compared to the tuning parameter. $\endgroup$ – Daniel Mårtensson May 24 '18 at 11:34
  • $\begingroup$ With little data compared to parameters, you typically regularize the objective using a penalty on the parameters. I don't understand how you intend to minimize something though, without using some sort of optimization strategy. $\endgroup$ – Johan Löfberg May 24 '18 at 12:44
  • $\begingroup$ The notation is weird also. As it stands now, it says that there are vectors $r$, each with length K, but you also have $K$ of these vectors as you loop over $k$ up to $K$. I suspect you mean $r$ is a vector of length $K$, and $r_k$ is an element in that vector. $\endgroup$ – Johan Löfberg May 24 '18 at 13:02
  • $\begingroup$ @JohanLöfberg Yes. $r_k$ is a element in the vector and $K$ is the length of the vector. I have not used optimazation methods except that QP-programming for linear MPC. $\endgroup$ – Daniel Mårtensson May 24 '18 at 13:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.