summaryrefslogtreecommitdiffstats
path: root/matlab/mex/mexHelpFunctions.cpp
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2017-09-15 16:38:08 +0200
committerWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2017-09-15 16:38:08 +0200
commitaa31a06235496c0d808e57c8ce914cb4b640bc6e (patch)
tree33385e828ddca0b2857bac9e3dac4dd3723a3eee /matlab/mex/mexHelpFunctions.cpp
parentf6aa2db83dfea89f9d2cfc6fcbd3da141ee77e02 (diff)
parent00a1c6118b2d64b867c8e640c295462bcccfc7c9 (diff)
downloadastra-aa31a06235496c0d808e57c8ce914cb4b640bc6e.tar.gz
astra-aa31a06235496c0d808e57c8ce914cb4b640bc6e.tar.bz2
astra-aa31a06235496c0d808e57c8ce914cb4b640bc6e.tar.xz
astra-aa31a06235496c0d808e57c8ce914cb4b640bc6e.zip
Merge branch 'master' into parallel_vec
Diffstat (limited to 'matlab/mex/mexHelpFunctions.cpp')
-rw-r--r--matlab/mex/mexHelpFunctions.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/matlab/mex/mexHelpFunctions.cpp b/matlab/mex/mexHelpFunctions.cpp
index d957aea..7cab248 100644
--- a/matlab/mex/mexHelpFunctions.cpp
+++ b/matlab/mex/mexHelpFunctions.cpp
@@ -1,10 +1,10 @@
/*
-----------------------------------------------------------------------
-Copyright: 2010-2015, iMinds-Vision Lab, University of Antwerp
- 2014-2015, CWI, Amsterdam
+Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
+ 2014-2016, CWI, Amsterdam
Contact: astra@uantwerpen.be
-Website: http://sf.net/projects/astra-toolbox
+Website: http://www.astra-toolbox.com/
This file is part of the ASTRA Toolbox.
@@ -23,7 +23,6 @@ You should have received a copy of the GNU General Public License
along with the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
-----------------------------------------------------------------------
-$Id$
*/
/** \file mexHelpFunctions.cpp
@@ -361,18 +360,18 @@ mxArray* stringToMxArray(std::string input)
StringUtil::splitString(col_strings, row_strings[0], ",");
// get dimensions
- int rows = row_strings.size();
- int cols = col_strings.size();
+ size_t rows = row_strings.size();
+ size_t cols = col_strings.size();
// init matrix
mxArray* pMatrix = mxCreateDoubleMatrix(rows, cols, mxREAL);
double* out = mxGetPr(pMatrix);
// loop elements
- for (unsigned int row = 0; row < rows; row++) {
+ for (size_t row = 0; row < rows; row++) {
StringUtil::splitString(col_strings, row_strings[row], ",");
// check size
- for (unsigned int col = 0; col < col_strings.size(); col++) {
+ for (size_t col = 0; col < col_strings.size(); col++) {
out[col*rows + row] = StringUtil::stringToFloat(col_strings[col]);
}
}
@@ -391,7 +390,7 @@ mxArray* stringToMxArray(std::string input)
double* out = mxGetPr(pVector);
// loop elements
- for (unsigned int i = 0; i < items.size(); i++) {
+ for (size_t i = 0; i < items.size(); i++) {
out[i] = StringUtil::stringToFloat(items[i]);
}
return pVector;