comparison examples/mysparse.c @ 15352:9a8dbd6b6b20

* mysparse.c (mexFunction): Declare pbr and pbr2 as mxLogical*, not bool*.
author John W. Eaton <jwe@octave.org>
date Tue, 11 Sep 2012 13:44:42 -0400
parents 6cb30a539481
children be41c30bcb44
comparison
equal deleted inserted replaced
15351:a291f850743c 15352:9a8dbd6b6b20
54 if (nlhs > 0) 54 if (nlhs > 0)
55 plhs[0] = v; 55 plhs[0] = v;
56 } 56 }
57 else if (mxIsLogical (prhs[0])) 57 else if (mxIsLogical (prhs[0]))
58 { 58 {
59 bool *pbr, *pbr2; 59 mxLogical *pbr, *pbr2;
60 mexPrintf ("Matrix is %d-by-%d logical", 60 mexPrintf ("Matrix is %d-by-%d logical",
61 " sparse matrix", m, n); 61 " sparse matrix", m, n);
62 mexPrintf (" with %d elements\n", nz); 62 mexPrintf (" with %d elements\n", nz);
63 63
64 pbr = mxGetLogicals (prhs[0]); 64 pbr = mxGetLogicals (prhs[0]);