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: figureRDMs.m
    path of file: ./repos/bspm/thirdparty/rsatoolbox/Modules
    
    the code of the file until where you have to start completion: function figureRDMs(RDMs, userOptions, localOptions)
%  figureRDMs(RDMs, userOptions[, localOptions])
%
%  figureInterleavedRDMs is a function which accepts a multidimensional struct of
%  RDMs, puts them into a 1D struct, and then shows them.
%
%        RDMs --- A struct of RDMs.
%                All RDMs in here will be concatenated and displayed.
%
%        userOptions --- The options struct.
%                userOptions.analysisName
%                        A string which is prepended to the saved files.
%                userOptions.rootPath

    
function figureRDMs(RDMs, userOptions, localOptions)
%  figureRDMs(RDMs, userOptions[, localOptions])
%
%  figureInterleavedRDMs is a function which accepts a multidimensional struct of
%  RDMs, puts them into a 1D struct, and then shows them.
%
%        RDMs --- A struct of RDMs.
%                All RDMs in here will be concatenated and displayed.
%
%        userOptions --- The options struct.
%                userOptions.analysisName
%                        A string which is prepended to the saved files.
%                userOptions.rootPath
%                        A string describing the root path where files will be
%                        saved (inside created directories).
%                userOptions.saveFigurePDF
%                        A boolean value. If true, the figure is saved as a PDF.
%                        Defaults to false.
%                userOptions.saveFigurePS
%                        A boolean value. If true, the figure is saved as a PS.
%                        Defaults to false.
%                userOptions.saveFigureFig
%                        A boolean value. If true, the figure is saved as a
%                        MATLAB .fig file. Defaults to false.
%                userOptions.displayFigures
%                        A boolean value. If true, the figure remains open after
%                        it is created. Defaults to true.
%                userOptions.imagelables
%                        Defaults to empty (no image labels).
%                userOptions.rankTransform
%                        Boolean value. If true, values in each RDM are
%                        separately transformed to lie uniformly in [0,1] with
%                        ranks preserved. If false, true values are represented.
%                        Defaults to true. This is for display only.
%                userOptions.colourScheme
%                        A colour scheme for the RDMs. Defualts to jet(64).
%                        
%        localOptions --- Further options.
%                localOptions.figureNumber
%                        If specified, this will set the figure number of the
%                        produced figure. Otherwise the figure number will be
%                        randomly generated (and probably large).
%                localOptions.fileName
%
% May save figures according to preferences.
%
%  Cai Wingfield 11-2009, 6-2010
%__________________________________________________________________________
% Copyright (C) 2010 Medical Research Council
returnHere = pwd;

%% Set defaults and check options struct
if nargin == 2, localOptions = struct(); end