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: Burgmann1994_FlatFractureDualElastic.m
    path of file: ./repos/CutAndDisplace/2dCode/AnalyticalTests/ComparisonScripts
    
    the code of the file until where you have to start completion: % Test: Test shows how to run with multiple elastic bodies and that this is setup to work
% correctl
    
function
FilterValue=2.5;
[S1,S2,Sxx,Syy,Sxy] = NanOrRemovePoints( FilterValue,S1,S2,Sxx,Syy,Sxy );

%Draw data with quiver, doesn't matter if its gridded or not
figure,quiver(X(:),Y(:),Ux(:),Uy(:));
xlabel('x'); ylabel('y'); axis('equal'); title('Disp'); 

%Drawing S1 S2 directions
DrawS1S2Directions(X(:),Y(:),S1dir,S2dir,'P1',P1,'P2',P2 )


%Check if data is on a uniform or non uniform grid
[ Uniform ] = UniformGridCheck2d( X,Y );

%If data is not uniform plot as non grid data. 
if Uniform==0
    DrawScatterPlots2d( X,Y,cmap2,Sxy,Syy,Sxx,S1,S2 );
else
    %Reshaping stresses to grid dimensions
    [X,Y,Sxx,Syy,Sxy,S1,S2,Exx,Eyy,Exy,E1,E2,Ux,Uy]=ReshapeData2d...
        ( dimx,dimy,X,Y,Sxx,Syy,Sxy,S1,S2,Exx,Eyy,Exy,E1,E2,Ux,Uy );
    DrawContourFPlots2d( X,Y,cmap2,Sxy,Syy,Sxx,S1,S2 );
    Dilatation2d=(E1+E2);
    DrawDeformedGrid2d( X,Y,Ux,Uy,cmap2,Dilatation2d);
end