From: Jacek G. <jm...@ec...> - 2001-07-23 15:14:44
|
Here's a transcript of a little exchange I just had with matlisp in CMUCL. (The matlisp was checked out from CVS within the last couple of hours). Jacek. ---------------------------------------------------------------------- * (setq the-matrix (make-real-matrix '((1 2 3) (4 5 6)))) #<REAL-MATRIX 2 x 3 1.0000 2.0000 3.0000 4.0000 5.0000 6.0000 > * (matrix-ref the-matrix 1 1) 5.0d0 * (help mref) In package MATLISP, the function MREF ===================================== Same as MATRIX-REF * (mref the-matrix 1 1) Invalid number of arguments: 3 Restarts: 0: [ABORT] Return to Top-Level. Debug (type H for help) (MREF 3 #<REAL-MATRIX 2 x 3 1.0000 2.0000 3.0000 4.0000 5.0000 6.0000 > 1)[:EXTERNAL] Source: ; File: /usr/local/src/matlisp-cvs/src/compat.lisp (DEFUN MREF (I &OPTIONAL J) "Same as MATRIX-REF" (IF J (MATRIX-REF M I J) (MATRIX-REF M I))) 0] (defun mref (m i &optional j) (if j (matrix-ref m i j) (matrix-ref m i))) Converted MREF. MREF 0] 0 * (mref the-matrix 1 1) 5.0d0 |