|
From: Michael A. K. <ma...@ll...> - 2004-12-01 18:27:43
|
When using MATRIX-REF to set sub-matrixes of type COMPLEX-MATRIX from
type COMPLEX-MATRIX I get an error.
Type REAL-MATRIX from REAL-MATRIX is okay.
Type COMPLEX-MATRIX from REAL-MATRIX is okay.
The following code segment shows this. I'm using
matlisp-2.0beta-2003-10-14.tar.gz under FreeBSD 4.9.
I suspect the problem is in REF.LISP but haven't tracked it down. Can
anyone help?
tnx
mike
(setf *a* (m:zeros 5 2)
*b* (m:ones 5 2)
*c* (m:make-complex-matrix 5 2)
*d* (m:m+ *b* (m:m* (sqrt -1) *b*)))
;; With reals all is well
(m:matrix-ref *a* (m:seq 0 4) 0)
(setf (m:matrix-ref *a* (m:seq 0 4) 0) (m:matrix-ref *b* (m:seq 0 4) 0))
;; With complex set from real all is well
(setf (m:matrix-ref *c* (m:seq 0 4) 1) (m:matrix-ref *b* (m:seq 0 4) 0))
;; With complex set from complex ... error
(m:matrix-ref *c* (m:seq 0 4) 0)
(setf (m:matrix-ref *c* (m:seq 0 4) 0) (m:matrix-ref *d* (m:seq 0 4) 0))
|