function m = omean(l) if ( numel(l) == 0 ) m = 0; else m = mean(l); endif endfunction disp(omean([])); disp(omean([1,2,3]));