If you want JordanForm to give the matrix Q that Jordanises the Matrix A then the Help pages tell you to use JordanForm(A, output='Q'); Unfortunately this doesn't work inside a procedure that has Q as a local variable: proc(A) local C; JordanForm(A, output='C'); end proc: generates an error on execution. I'm not sure whether this is a bug although it is surely a poor state of affairs. I don't understand why the syntax has been set so that the value of the option is the global name C - is there some possible advantage to it? . Surely it would avoid all such problems if all options and option values (of this sort) were either reserved words or strings. So then the syntax would be JordanForm(A, output="C"); (And output too would be made a string unless output is a reserved word.) There is btw a fix which is to use JordanForm(A, output=':-C'); which works always (and perhaps the help pages should say that). Still, it is all so ugly compared to the string solution.

Please Wait...