How can i solve equation with backslash?
2 views (last 30 days)
Show older comments
Selien Alberts
on 30 Sep 2017
Answered: Walter Roberson
on 30 Sep 2017
Y = A/x + B*exp(-2x^2)
How do I set up the normal equations for this to solve for a and b using backslash?
0 Comments
Accepted Answer
Walter Roberson
on 30 Sep 2017
Create
M = [1./x(:), exp(-2.*x(:).^2)]
now solve M*[a;b] = Y using the backslash operator
0 Comments
More Answers (0)
See Also
Categories
Find more on Linear Algebra 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!