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: stipple.m
    path of file: ./repos/CDT/cdt
    
    the code of the file until where you have to start completion: function h = stipple(x,y,mask,varargin)
% stipple creates a hatch filling or stippling within a grid. This
% function is designed primarily to show regions of statistical 
% significance in spatial maps. 
% 
%% Syntax
% 
%  stipple(x,y,mask) 
%  stipple(...,MarkerProperty,MarkerValue,...)
%  stipple(...,'density',DensityValue) 
%  stipple(...,'resize',false) 
%  h = stipple(...)
% 
%% Description
% 
% stipple(x,y,mask) plots black dots in x,y locations wherever a mask contains
% true values. Dimensions of x, y, and mask must all match. 
% 
% stipple(...,MarkerProperty,MarkerValue,...) specifies any marker properties
% that are accepted by the plot function (e.g., 'color', 'marker', 'markersize', etc). 
%  
% stipple(...,'density',DensityValue) specifies density of stippling markers. 
% Default density is 100, but if your plot is too crowded you may specify a 
% lower density value (and/or adjust the markersize). 
% 

    
function h = stipple(x,y,mask,varargin)
% stipple creates a hatch filling or stippling within a grid. This
% function is designed primarily to show regions of statistical 
% significance in spatial maps. 
% 
%% Syntax
% 
%  stipple(x,y,mask) 
%  stipple(...,MarkerProperty,MarkerValue,...)
%  stipple(...,'density',DensityValue) 
%  stipple(...,'resize',false) 
%  h = stipple(...)
% 
%% Description
% 
% stipple(x,y,mask) plots black dots in x,y locations wherever a mask contains
% true values. Dimensions of x, y, and mask must all match. 
% 
% stipple(...,MarkerProperty,MarkerValue,...) specifies any marker properties
% that are accepted by the plot function (e.g., 'color', 'marker', 'markersize', etc). 
%  
% stipple(...,'density',DensityValue) specifies density of stippling markers. 
% Default density is 100, but if your plot is too crowded you may specify a 
% lower density value (and/or adjust the markersize). 
% 
% stipple(...,'resize',false) overrides the 'density' option and plots stippling 
% at the exact resolution of the input grid. By default, the grids are resized
% because any grid larger than about 100x100 would produce so many stippling
% dots it would black out anything under them. 
% 
% h = stipple(...) returns a handle of the plotted stippling objects. 
% 
%% Examples
% For examples, type 
% 
%  cdt stipple
% 
%% Author Info
% This function was written by Chad A. Greene, August 2018. 
% 
% See also: stipplem.

%% Error checks: 

narginchk(3,inf)

% Turn vectors into grids: 
if all([isvector(x) isvector(y)])
   [x,y] = meshgrid(x,y); 
end