Mercurial > octave-nkf
diff src/data.cc @ 7269:3fade00a6ac7
[project @ 2007-12-07 19:26:20 by jwe]
author | jwe |
---|---|
date | Fri, 07 Dec 2007 19:26:21 +0000 |
parents | 2eb392d058bb |
children | 402168152bb9 ac34316ad003 |
line wrap: on
line diff
--- a/src/data.cc Fri Dec 07 17:11:28 2007 +0000 +++ b/src/data.cc Fri Dec 07 19:26:21 2007 +0000 @@ -2877,6 +2877,17 @@ else print_usage (); + // Should not return a sparse type + if (retval(0).is_sparse_type ()) + { + if (retval(0).type_name () == "sparse matrix") + retval(0) = retval(0).matrix_value (); + else if (retval(0).type_name () == "sparse complex matrix") + retval(0) = retval(0).complex_matrix_value (); + else if (retval(0).type_name () == "sparse bool matrix") + retval(0) = retval(0).bool_matrix_value (); + } + return retval; }