Scilab function interp1 produces warnings about addition (+ operation) of empty matrix
Reported by nyberghans
BUG DESCRIPTION:
----------------
From scilab 6, my code produces warnings that did not occur in scilab 5. I do not have the time or programming skill to dig much deeper, but I can see that the warning occurs inside the interp1 function, and so it seems at first sight my code is not the culprit. In the end, my code still seems to produce correct results, but I am not 100% sure of this.
The calling function looks like this:
function tableval=TableLookupExtend(value,table)
tableval = interp1([0:16]*4096,table,value,'linear');
for i=1:length(tableval)
if isnan(tableval(i))
tableval(i) = interp1([0:16]*4096,table,value(i),'nearest','extrap');
end
end
endfunction
ERROR LOG:
----------
operation +: Warning adding a matrix with the empty matrix will give an empty matrix result.
at line 339 of function interp1 ( C:\Program Files\scilab-6.0.0\modules\interpolation\macros\interp1.sci line 351 )
at line 5 of function TableLookupExtend ( C:\Users\hannyb\Desktop\2018-08-21_PId6426_6438\function_defs.sci line 29 )
at line 16 of function CalcTsAndSpan ( C:\Users\hannyb\Desktop\2018-08-21_PId6426_6438\calcCalPar.sci line 128 )
at line 136 of function CalcParams ( C:\Users\hannyb\Desktop\2018-08-21_PId6426_6438\calibration_functions.sci line 156 )
at line 45 of executed file C:\Users\hannyb\Desktop\2018-08-21_PId6426_6438\calcCalPar.sci
at line 59 of executed file C:\Users\hannyb\Desktop\2018-08-21_PId6426_6438\do_calc_dts_dts2_2014-04-22_indirect_PId6438_part_1.sci
HOW TO REPRODUCE THE BUG:
-------------------------
OTHER INFORMATION:
------------------