diff src/OPERATORS/op-scm-cs.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 8d7162924bd3
line wrap: on
line diff
--- a/src/OPERATORS/op-scm-cs.cc	Fri Apr 29 05:20:01 2005 +0000
+++ b/src/OPERATORS/op-scm-cs.cc	Fri Apr 29 13:04:25 2005 +0000
@@ -72,13 +72,15 @@
 
 DEFBINOP (ldiv, sparse_complex_matrix, complex)
 {
-  CAST_BINOP_ARGS (const octave_sparse_complex_matrix&, 
-		   const octave_complex&);
+  CAST_BINOP_ARGS (octave_sparse_complex_matrix&, const octave_complex&);
 
+  SparseType typ = v1.sparse_type ();
   SparseComplexMatrix m1 = v1.sparse_complex_matrix_value ();
   ComplexMatrix m2 = ComplexMatrix (1, 1, v2.complex_value ());
+  ComplexMatrix ret = xleftdiv (m1, m2, typ);
+  v1.sparse_type (typ);
 
-  return xleftdiv (m1, m2);
+  return ret;
 }
 
 DEFBINOP_FN (lt, sparse_complex_matrix, complex, mx_el_lt)