 # This is a simple problem. Normaly I use two for-loops in GNU Octave to find the parameter a an pouzdrotf 2022-07-06 Answered
This is a simple problem. Normaly I use two for-loops in GNU Octave to find the parameter $a$ and $b$ and $K$.
The cost function I'm going to minimize is:
$V=\sum _{i=0}^{N}\left(|{u}_{i}-K-{u}_{0}{a}^{-b{t}_{i}}|\right)$
Where ${u}_{i}$ is a vector for measurement and ${t}_{i}$ is also a measured vector. ${u}_{0}$ is known so only $a$,$b$,$K$ is unknow.
Is there any other way to minimize $V$ instead of using three for-loops in GNU Octave?
In my case, two-variables can solve the problem too. The $K$ is just a correction factor. Not necessary to 100%.
You can still ask an expert for help

• Live experts 24/7
• Questions are typically answered in as fast as 30 minutes
• Personalized clear answers

Solve your problem for the price of one coffee

• Math expert for every subject
• Pay only if we can solve it postojahob
Have you looked at fminsearch? It can minimize a cost function over several parameters (just put them together in one vector).

We have step-by-step solutions for your answer!