How do I solve a equation using lsqnonlin, but have solutions bound by another equation?
1 view (last 30 days)
Show older comments
Hi,
I'm trying to use lsqnonlin to find parameters of an equation:
y = a1.*x^2 + a2.*x + a3
where a1, a2 and a3 are parameters.
I also want to implement a constraint equation:
a1 + a2 + a3 = 1
How do I go about implementing this constraint equation into lsqnonlin?
Thanks
0 Comments
Answers (1)
Walter Roberson
on 18 Aug 2015
Pass in one fewer value and calculate the third value as 1 - sum() of the others.
0 Comments
See Also
Categories
Find more on Systems of Nonlinear Equations 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!