Optimise the solution of a Matrix setting constraints to limit the possible solutions within a range?
4 views (last 30 days)
Show older comments
Dear all, I've made a program to solve the magnetic field for a given geometry, the result is given by a matrix that sums the results for every element in my geometry to a given point in space, I have limited this to lets say 1458 elements and 1458 points in space. Now I want to use this matrix to optimise the solution to find the necessary currents for a given magnetic field. If I use a Matrix that is 1458x1458 I cannot use mldivide since the Matrix is near the working precision and or singular and I get back results that are nonsense. I tried using lsqr and this seems to give a decent solution if I set an initial value close to what the solution is. However this only works when I set the problem to be very homogeneous. I am trying to optimise for fields that may be not very homogeneous so I would like to set constraints that limit the solutions within certain range lets say that solution cannot be less than 0 or bigger than 120. Is there a way to do this in Matlab or is there any solver you recommend me to solve this problem?
0 Comments
Answers (1)
See Also
Categories
Find more on Linear Least Squares 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!