HP Forums
LinSolve Syntax and Documentation - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: LinSolve Syntax and Documentation (/thread-7244.html)



LinSolve Syntax and Documentation - chris.bragg - 11-16-2016 10:59 PM

There is a function "linsolve" (aka LinSolve) referenced both in the user guide and the system "help" system. While there are alternative functions (Solve2x2 and Solve3x3) that work as documented, LinSolve does not seem to work as intended. See the attached images, Namely the "User Guide", the system "Help" and a screen shot showing my attempts at marking the function work. Have I missed something here?

[attachment=4150]
[attachment=4151]
[attachment=4152]


RE: LinSolve Syntax and Documentation - Didier Lachieze - 11-16-2016 11:39 PM

linsolve and LinSolve are two different functions with different syntax.

linsolve is a CAS function while LinSolve is a function of the Linear Solver application.

If the Linear Solver is the active application you can call directly: LinSolve([[1,5,8],[2,6,9]]), otherwise you need to use the full name: Linear_Solver.LinSolve([[1,5,8],[2,6,9]]).

In CAS mode the syntax for linsolve is: linsolve([x+5*y=8, 2*x+6*y=9],[x,y])


RE: LinSolve Syntax and Documentation - chris.bragg - 11-17-2016 01:24 AM

Thanks for the response. Much appreciated. Slowly getting my head around the system.


RE: LinSolve Syntax and Documentation - toshk - 11-17-2016 02:56 AM

both functions are more alike ... than unlike, if you remove the masking by hp.

LinSolve([[1,5,8],[2,6,9]]) same as
linsolve([[1,5],[2,6]],[[8],[9]]) same as
LSQ([[1,5],[2,6]],[[8],[9]]) same as using other matrix factorization;(svd, QR, and etc)

svd is more robust in solving linear systems of equations:(with ill condition matrices).
depending on the matrix condition feel free to use any.