changeset 5894:d14e3342cb28 octave-forge

fix h.X(256) for uint8
author schloegl
date Thu, 06 Aug 2009 13:44:45 +0000
parents 111e30774437
children 3c541d62c1c7
files extra/NaN/src/histo_mex.cpp
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/extra/NaN/src/histo_mex.cpp	Thu Aug 06 06:16:04 2009 +0000
+++ b/extra/NaN/src/histo_mex.cpp	Thu Aug 06 13:44:45 2009 +0000
@@ -40,6 +40,7 @@
 	speed: its slower than the m-functions histo2/3/4
 		|-> use a more efficient sorting function 
 	resembling of histo3 for multicolumn data. 
+	support of complex data and char-strings 
 */
 
 #include <inttypes.h>
@@ -348,7 +349,7 @@
 
 			int8_t *x;
 			x = (int8_t*)mxGetData(X);
-			for (k=0; k<=255; k++)
+			for (k=0; k<0x0100; k++)
 				x[k]=k-128;
 
 			x = (int8_t*)mxGetData(PInputs[0]);
@@ -367,8 +368,7 @@
 			mxSetField(HIS,0,"X",X);
 
 			uint8_t *x = (uint8_t*)mxGetData(X);
-			for (k=0; k<255; k++)
-				x[k]=k;
+			for (k=0; k<0x0100; k++) x[k]=k;
 
 			x = (uint8_t*)mxGetData(PInputs[0]);
 			double *h = (double*)mxGetData(H);