I am trying to follow the examples of the linear algebra documentation:
But when I try to compute the eigenvalues or eigenvectors I get:
ERROR: UndefVarError: eigvecs not defined
I am literally copying and pasting the example into the REPL, so either there it is not clear that some package must be loaded before using these functions, or there is a bug. I am using v1.0
Thank you very much.
It is a stdlib so
using LinearAlgebra is first needed. Perhaps that should be more explicit.
Thanks Kristoffer. That was indeed the problem.
For newbies like me facing this question: add
to the code.
I remark that the manual is not clear on that. It says that Julia provides native implementations of many linear algebra functions, and exemplifies with tr(A), det(A), which work out of the box, and then exemplifies with eigvals(A), eigvecs(A), which result in that error.
In other words, it is just that the manual is not clear in the sense that it suggests that the functions are usable out of the box, and does not indicate that a package must be used, and which is the name of the package.
To be clear, I am referring to this page:
Thank you very much again.