summaryrefslogtreecommitdiffstats
path: root/matlab
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2015-09-17 16:54:37 +0200
committerWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2015-09-17 16:54:37 +0200
commit11717f66b49fbe41faf923f267c6893ce9af46ad (patch)
tree68fddaa960222944d9947a84376cee5efc235f70 /matlab
parentc1713c00c4aeae594913667d868106e8591dd1d1 (diff)
downloadastra-11717f66b49fbe41faf923f267c6893ce9af46ad.tar.gz
astra-11717f66b49fbe41faf923f267c6893ce9af46ad.tar.bz2
astra-11717f66b49fbe41faf923f267c6893ce9af46ad.tar.xz
astra-11717f66b49fbe41faf923f267c6893ce9af46ad.zip
Use mxLogical instead of bool.
This should improve compatibility with Octave according to Christian Häggström.
Diffstat (limited to 'matlab')
-rw-r--r--matlab/mex/astra_mex_data2d_c.cpp4
-rw-r--r--matlab/mex/astra_mex_matrix_c.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/matlab/mex/astra_mex_data2d_c.cpp b/matlab/mex/astra_mex_data2d_c.cpp
index 909d229..935e476 100644
--- a/matlab/mex/astra_mex_data2d_c.cpp
+++ b/matlab/mex/astra_mex_data2d_c.cpp
@@ -222,7 +222,7 @@ void astra_mex_data2d_create(int& nlhs, mxArray* plhs[], int& nrhs, const mxArra
// logical data
if (mxIsLogical(prhs[3])) {
- bool* pbMatlabData = mxGetLogicals(prhs[3]);
+ mxLogical* pbMatlabData = mxGetLogicals(prhs[3]);
int i = 0;
int col, row;
for (col = 0; col < dims[1]; ++col) {
@@ -322,7 +322,7 @@ void astra_mex_data2d_store(int nlhs, mxArray* plhs[], int nrhs, const mxArray*
// logical data
if (mxIsLogical(prhs[2])) {
- bool* pbMatlabData = mxGetLogicals(prhs[2]);
+ mxLogical* pbMatlabData = mxGetLogicals(prhs[2]);
int i = 0;
int col, row;
for (col = 0; col < dims[1]; ++col) {
diff --git a/matlab/mex/astra_mex_matrix_c.cpp b/matlab/mex/astra_mex_matrix_c.cpp
index aa31383..e07ddb6 100644
--- a/matlab/mex/astra_mex_matrix_c.cpp
+++ b/matlab/mex/astra_mex_matrix_c.cpp
@@ -112,7 +112,7 @@ static bool matlab_to_astra(const mxArray* _rhs, CSparseMatrix* _pMatrix)
mwIndex *colStarts = mxGetJc(_rhs);
mwIndex *rowIndices = mxGetIr(_rhs);
double *floatValues = 0;
- bool *boolValues = 0;
+ mxLogical *boolValues = 0;
bool bLogical = mxIsLogical(_rhs);
if (bLogical)
boolValues = mxGetLogicals(_rhs);