I have a system of linear equations in the following form. How can I solve it in Matlab? <munde

Antoine Hill

Antoine Hill

Answered question

2022-05-21

I have a system of linear equations in the following form. How can I solve it in Matlab?
argmin a , b i , j [ X ( i , j ) a × Y ( i , j ) b ] 2
Where X and Y are known. I need to estimate a and b - which do not depend on (i,j).

Answer & Explanation

Ronnie Glenn

Ronnie Glenn

Beginner2022-05-22Added 11 answers

Let A = [ Y ( 1 , 1 ) 1 Y ( 2 , 1 ) 1 Y ( m , n ) 1 ] , y = [ X ( 1 , 1 ) X ( 2 , 1 ) X ( m , n ) ] , and x = [ a b ] .
Then, the problem can be rewritten as argmin x y A x 2 2
This is now the standard linear least squares problem. The solution is x ^ = ( A T A ) 1 A T y.

Do you have a similar question?

Recalculate according to your conditions!

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?