diff src/OPERATORS/op-scm-m.cc @ 5322:22994a5730f9

[project @ 2005-04-29 13:04:24 by dbateman]
author dbateman
date Fri, 29 Apr 2005 13:04:25 +0000
parents 4c8a2e4e0717
children 2042301733ce
line wrap: on
line diff
--- a/src/OPERATORS/op-scm-m.cc	Fri Apr 29 05:20:01 2005 +0000
+++ b/src/OPERATORS/op-scm-m.cc	Fri Apr 29 13:04:25 2005 +0000
@@ -57,7 +57,7 @@
 DEFBINOP (div, sparse_complex_matrix, matrix)
 {
   CAST_BINOP_ARGS (const octave_sparse_complex_matrix&, 
-		   const octave_matrix&);
+                   const octave_matrix&);
   
   return xdiv (v1.complex_matrix_value (), v2.matrix_value ());
 }
@@ -70,10 +70,15 @@
 
 DEFBINOP (ldiv, sparse_complex_matrix, matrix)
 {
-  CAST_BINOP_ARGS (const octave_sparse_complex_matrix&, 
-		   const octave_matrix&);
+  CAST_BINOP_ARGS (octave_sparse_complex_matrix&, const octave_matrix&);
   
-  return xleftdiv (v1.sparse_complex_matrix_value (), v2.matrix_value ());
+  SparseType typ = v1.sparse_type ();
+
+  ComplexMatrix ret = xleftdiv (v1.sparse_complex_matrix_value (), 
+				v2.matrix_value (), typ);
+
+  v1.sparse_type (typ);
+  return ret;
 }
 
 DEFBINOP_FN (lt, sparse_complex_matrix, matrix, mx_el_lt)