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: MARS_AverageDisplacementVectors.m
    path of file: ./repos/CBIG/external_packages/SD/SDv1.5.1-svn593/BasicTools
    
    the code of the file until where you have to start completion: % Contact ythomas@csail.mit.edu or msabuncu@csail.mit.edu for bugs or questions 
%
%=========================================================================
%
%  Copyright (c) 2008 Thomas Yeo and Mert Sabuncu
%  All rights res
    
function smoothed_vertices = MARS_AverageDisplacementVectors(mesh, curr_vertices, var, num_iter)

% smoothed_vertices = MARS_AverageDisplacementVectors(uniform_mesh, curr_vertices, var, num_iter)
%
% Written by Thomas Yeo, MIT

%smoothed_vertices = MARS_findTangentVecPt1toPt2(mesh.vertices, curr_vertices);
smoothed_vertices = SD_TangentVecPt1toPt2Sine(mesh.vertices, curr_vertices);

for i = 1:num_iter
    smoothed_vertices = MARS_simpleAverageTangentVectors(mesh, smoothed_vertices, var);
    smoothed_vertices = MARS_projectGradOntoTangentPlane(mesh.vertices, smoothed_vertices);
end