MATLAB: Nnet simulaton errror Mixed interger

nnet error

I am getting a Mixed integer class inputs are not supported error when I simulate my Nnet. I even changed all the input maxrix to zero and I get the same error
>> WeekAheadLoadForecast
performance =
2.1066
trainPerformance =
2.1269
valPerformance =
2.0739
testPerformance =
1.9771
Error using bsxfun
Mixed integer class inputs are not supported.
Error in mapminmax.apply (line 6)
y = bsxfun(@minus,x,settings.xoffset);
Error in nnet.mode.matlab.processInput (line 7)
x = hints.inp(i).procApply{j}(x,hints.inp(i).procSet{j});
Error in nnet.mode.matlab.processInputs (line 12)
xp = nnet.mode.matlab.processInput(x,i,hints);
Error in nncalc.preCalcData (line 16)
data.Pc = nnet.mode.matlab.processInputs(net,[data.Xi data.X],data.Q,hints);
Error in nncalc.setup1>setupImpl (line 180)
calcData = nncalc.preCalcData(matlabMode,matlabHints,net,data,doPc,doPd,calcHints.doFlattenTime);
Error in nncalc.setup1 (line 16)
[calcMode,calcNet,calcData,calcHints,net,resourceText] = setupImpl(calcMode,net,data);
Error in network/sim>nncalc_setup (line 761)
[calcMode,calcNet,calcData,calcHints,net,resourceText] = nncalc.setup1(calcMode,net,data);
Error in network/sim (line 274)
[calcLib,calcNet,net,resourceText] = nncalc_setup(calcMode,net,data);
Error in LoadForecastNN (line 6)
Yint = sim(net, Xint')';
Error in WeekAheadLoadForecast (line 31)
[YFcstNN] = LoadForecastNN(net,XFcstNN);

Best Answer

Create your net with floating point, and make sure the data you pass in at simulation time is the right kind of floating point.
For example it might turn out that all you need is
[YFcstNN] = LoadForecastNN(net, double(XFcstNN) );
(There are times when using an integer data type is appropriate in creating nets, but you need to make sure that you pass the same kind of integer at all stages.