Mercurial > octave-nkf
diff src/OPERATORS/op-m-scm.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-m-scm.cc Fri Apr 29 05:20:01 2005 +0000 +++ b/src/OPERATORS/op-m-scm.cc Fri Apr 29 13:04:25 2005 +0000 @@ -56,10 +56,15 @@ DEFBINOP (div, matrix, sparse_complex_matrix) { - CAST_BINOP_ARGS (const octave_matrix&, - const octave_sparse_complex_matrix&); - - return xdiv (v1.matrix_value (), v2.sparse_complex_matrix_value ()); + CAST_BINOP_ARGS (const octave_matrix&, octave_sparse_complex_matrix&); + + SparseType typ = v2.sparse_type (); + + ComplexMatrix ret = xdiv (v1.matrix_value (), + v2.sparse_complex_matrix_value (), typ); + + v2.sparse_type (typ); + return ret; } DEFBINOPX (pow, matrix, sparse_complex_matrix)