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: randInCircle.m
    path of file: ./repos/GIBBON/lib
    
    the code of the file until where you have to start completion: function [V]=randInCircle(varargin)

% function [V]=randInCircle(n,R)
% ------------------------------------------------------------------------
% Create random and uniform distribution of n points in a circle with
% radius R. The output array V is an nx2 2D coordinate array. 
%
% 2021/06/28 Created KMM

    
function [V]=randInCircle(varargin)

% function [V]=randInCircle(n,R)
% ------------------------------------------------------------------------
% Create random and uniform distribution of n points in a circle with
% radius R. The output array V is an nx2 2D coordinate array. 
%
% 2021/06/28 Created KMM
% ------------------------------------------------------------------------

%%

switch nargin
    case 1
        n=varargin{1};
        R=1;
    case 2
        n=varargin{1};
        R=varargin{2};
    otherwise
        error('Wrong number of input arguments. Define 1 or 2 input arguments'); 
end