You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: randomPointInBox.m
    path of file: ./repos/matGeom/matGeom/geom2d
    
    the code of the file until where you have to start completion: function points = randomPointInBox(box, N, varargin)
%RANDOMPOINTINBOX Generate random point within a box.
%
%   PTS = randomPointInBox(BOX)
%   Generate a random point within the box BOX. The result is a 1-by-2 row
%   vector.

    
function points = randomPointInBox(box, N, varargin)
%RANDOMPOINTINBOX Generate random point within a box.
%
%   PTS = randomPointInBox(BOX)
%   Generate a random point within the box BOX. The result is a 1-by-2 row
%   vector.
%
%   PTS = randomPointInBox(BOX, N)
%   Generates N points within the box. The result is a N-by-2 array.
%
%   BOX has the format:
%   BOX = [xmin xmax ymin ymax].
%
%   Example
%     % draw points within a box
%     box = [10 80 20 60];
%     pts =  randomPointInBox(box, 500);
%     figure(1); clf; hold on;
%     drawBox(box);
%     drawPoint(pts, '.');
%     axis('equal');
%     axis([0 100 0 100]);
%
%   See also 
%     geom2d, points2d, boxes2d, randomPointInBox3d, randomPointInPolygon
%

% ------
% Author: David Legland
% E-mail: david.legland@inrae.fr
% Created: 2007-10-10, using Matlab 7.4.0.287 (R2007a)
% Copyright 2007-2023 INRA - BIA PV Nantes - MIAJ Jouy-en-Josas

if nargin < 2
    N = 1;
end