Generates an error if the variable has a zero imaginary part.
errmsg=apifun_checkcomplex(funname,var,varname,ivar)
a 1-by-1 matrix of strings, the name of the calling function.
a 1-by-1 matrix of valid Scilab data type, the variable
a 1-by-1 matrix of string, the name of the variable
a 1-by-1 matrix of floating point integers, the index of the input argument in the calling sequence
a 1-by-1 matrix of strings, the error message. If there was no error, the error message is the empty matrix.
This function is designed to be used to design functions where the input argument is complex matrix of doubles. This function cannot be use when var is a function, or more generally, for any input argument for which the isreal function does not work.