function vres = myiffor(j1, j2, j3)
% myiffor takes 3 inargs, j1, j2, j3, all of them integers and 
% returns one value

% If j1 is positive, it returns a ROW VECTOR of length j2, each
% of whose elements is j3

% If j1 is negative it returns a COLUMN VECTOR of length l2, each
% of whose elements is j3

% If i1 is 0 it returns the scalar 0


% If i1 is 0 it returns 0
   if j1 > 0 
      for i = 1 : j2
         vres(i) = j3;
      end
   elseif j1 < 0 
      for i = 1 : j2
         vres(i,1) = j3;
      end
   else
      vres = 0;
   end
end
