1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Minimizing error function -> sloving linear system of equations

  1. Feb 6, 2009 #1
    1. The problem statement, all variables and given/known data
    I want to find certain coefficients [tex]\alpha_{uv}[/tex] by minimizing a error function. In the end, I want to make a function of this, so iteration is not a problem. I want to estimate these coefficients to find the best estimate for [tex]f(x,y)[/tex].

    2. Relevant equations
    The error function:
    E(\alpha)=\sum_{x,y}w(x,y)\Big( f(x,y)-\sum_{u,v=-N}^{N}\alpha_{u,v}f(x+u, y+v)\Big)^{2}
    w(x,y)=P(f(x,y)\in M_1|f(x,y)),
    which in turn is equal to

    \frac{1}{\sigma\sqrt{2\pi}} \frac{exp\Big[ -\frac{1}{2\sigma^2} \Big( f(x,y) - \sum_{u,v=-N}^{N}\alpha_{u,v}f(x+u, y+v)\Big)^2\Big]}{ \sum_{i=1}^{2}P(f(x,y)|f(x,y)\in M_{i}) }
    3. The attempt at a solution
    \frac{\partial E}{\partial \alpha_{s,t}}=0

    eventually gives:

    \sum_{u,v=-N}^{N}\alpha_{u,v}=\frac{ \sum_{x,y}w(x,y)f(x+s, y+t)f(x,y) }{ \sum_{x,y}w(x,y)f(x+s, y+t)f(x+u, y+v) }

    So, now we have a linear system of equations. I don't know how to solve this in a efficient way.
    Thanks in advance,
    Last edited: Feb 6, 2009
  2. jcsd
  3. Feb 6, 2009 #2


    User Avatar
    Science Advisor

    That's a very wide question! There are many different ways of solving a linear system- which is most efficient depends on the coefficients. Gaussian eliminaion with pivoting is probably the best general method.
  4. Feb 6, 2009 #3
    I was afraid of that ;). I'll find my linear algebra book ;).
    Is there anyone who has experience in solving these equations in Matlab? There are probably functions for this purpose ; again, any kick in the right direction is welcome ;)
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook