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: arSaveAsExample.m
    path of file: ./repos/d2d/arFramework3/Advanced
    
    the code of the file until where you have to start completion: % arSaveAsExample([makePlots])
% 
%  Function for copying the current model to arFramwork3/Examples
% 
%       makePlots   logical that decides whether to produce plots [true]
%                       true: new plots are made for x, y, and profiles
%           
    
function to copy it to the examples folder.
% 
%  The folder is added to .gitignore
% 
%  The following is copied:
%       ar.fkt
%       *.def and *.xls of the loaded models and data
%       d2d workspaces saved with arSave
%       plots
% 
% See also arSave

function arSaveAsExample(makePlots)
if ~exist('makePlots','var') || isempty(makePlots)
    makePlots = true;
end

global ar 

name = input('Model will be saved as Example. Please enter the name: ','s');
name = strrep(name,' ','_');
% arSave(name);
arSave('current');


if makePlots
    plePlotMulti([],true);
end