function x=isoddm(a)if isnan(a)==1 x=-1; elseif mod(a,2)==0.5 x=-1; elseif mod(a,2)==1.5 x=-1; elseif mod(a,2)==0 x=0; elseif mod(a,2)==1 x=1; else x=nan; end
The purpose of this function is to see whether an array element is an integer or not and if it is, is it an even or odd number. The problem I am having is that it cannot evaluate each cell in an array individually.
Best Answer