Solve for coefficients of a function
1 次查看(过去 30 天)
显示 更早的评论
Can someone please help me solve for the coefficients (alpha) that minimize the following function?
error = 0 == sum((A-alpha*B).^2);
A = size 1 x 1300 [ 2 45 7 8 3 2 56 ...]
alpha = coefficients of size 1 x n
B = size n x 1300
I am not sure how to write the code and what functions to use. Any help is appreciated!
0 个评论
采纳的回答
Star Strider
2018-4-25
I am guessing that your system is linear.
If so, you can calculate the (1xn) vector of ‘alpha’ coefficients as:
alpha = A/B;
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Get Started with Optimization Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!