24-Ruby IV
October 13, 2021
Solved
lsove - error?
- October 13, 2021
- 3 replies
- 4850 views
This system has not solution. The lsolve must return an error message, not solution!
What do you think about this?

@ValeryOchkov wrote:
I think it is an error! Wrong answer is more badly as an error message!
Its not an error, its just a function which behaves differently than you expected.
You won't call an answer given by "MinErr" as being wrong. You don't do this, because you know that "minerr" is not necessarily returning an exact solution to a problem but does its best to give you a "close solution".
The same is true with "lsolve". The difference only is, that you did not know that it also may give you just a close solution and not an exact one.
Of course you are free to think that a function with the word "solve" in its name should not be allowed to return an inexact (wrong?) least-square solution but rather should return an error in case of an inconsistent system. This may be a matter of personal taste and you can always open a case with PTC support and wait for them to change the algorithm behind "lsolve" - Good luck! 🙂 👿
I wouldn't get upset myself. I can live with the fact that the documentation clearly describes that "lsolve" may also provide approximate solutions and can remember that (well, hopefully I can remember that) and use the function accordingly.
My point was: Its not a bug, its not wrong, its not an error - it works as specified!
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.