Jump to content

finding the minimum value of a function

Featured Replies

Hi

 

in my previous topic we reached to a conclusion that I need to find the minimum value of the following function .

 

[math]

cost(a, b, c) = \Sigma_i (y_i - a x_i^b - c)^2

[/math]

 

 

"yi" and "xi" are the result of a complicated analysis on my lab data and I need to find a,b,c in a way that COST(a,b,c) function be minimum.

I know its simple to use mathematical softwares like matlab or mathematica. but I have to develop my program with c++ so I need to know the algorithm of this process.

 

can you help me with that ? I would be appreciated ;)

I suggest maybe calling the matlab engine from c++ if it is as you say difficult for you to come up with the algorithms yourself. There are also math libraries for c++ find the one that suits your needs. It can make things difficult if you are not prepared to learn the entirety of the maths before you start.

Edited by Xittenn

Archived

This topic is now archived and is closed to further replies.

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.