Solve for coefficients of a function
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Audrey Cheong
le 25 Avr 2018
Commenté : Star Strider
le 25 Avr 2018
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 commentaires
Réponse acceptée
Star Strider
le 25 Avr 2018
I am guessing that your system is linear.
If so, you can calculate the (1xn) vector of ‘alpha’ coefficients as:
alpha = A/B;
2 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Get Started with Optimization Toolbox dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!