Optimizing parameters for a system of linear equations
Show older comments
This is rather an easy problem but I cannot get my head around with it. Please help. The question is followign:
I have two data sets in the form of F(fi, xi) and G(gi, xi) with i = 1..65. These two curves supposed to be the same but different in raw format. I want to find the parameters that make these two curves equal such that
aF + bG = 0, or ai * fi + bi * gi = 0 subject to
.
In matrix form,

constraints:
I want to find a's and b's.
How do I do it in matlab?
Answers (2)
Torsten
on 8 Jan 2019
0 votes
One possible choice:
a_i = g_i / 2 * sum_{j=1}^{j=65} (f_j - g_j) / sum_{j=1}^{j=65} (f_j * g_j)
b_i = -f_i / 2 * sum_{j=1}^{j=65} (f_j - g_j) / sum_{j=1}^{j=65} (f_j * g_j)
Best wishes
Torsten.
Categories
Find more on Get Started with MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!