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: CBIG_PlotCorrMatNoOrder.m
    path of file: ./repos/CBIG/utilities/matlab/figure_utilities/PlotCorrMat
    
    the code of the file until where you have to start completion: function CBIG_PlotCorrMatNoOrder(corr_mat, scalelim)

% CBIG_PlotCorrMatNoOrder(corr_mat, scalelim)
%
% This script visualize the ROI2ROI correlation matrix <corr_mat> with given colormap range <scalelim>.
% The script will not perform and reordering but simply visualize correlation matrix as the original
% order.
%
%   - corr_mat: (KxK matrix)
%       The ROI2ROI correlation matrix. 
%
%   - scalelim: ([lim_min limmax])
%       The range of the colormap. The <scalelim> should be a 1x2 vector where <lim_min> and <lim_max>
%       are the mininum and maximum value of the range. By default, <lim_min> is the -1*maximum
%       abosulute value of corr_mat, <lim_max> is the maximum abosulute value of corr_mat.
%
% Examples:
% corr_mat = rand(6,6)-0.5;
% CBIG_PlotCorrMatNoOrder(corr_mat, [-0.5 0.5]);  
%
% Written by Ruby Kong and CBIG under MIT license: https://github.com/ThomasYeoLab/CBIG/blob/master/LICENSE.md

%% load colormap
load('corr_mat_colorscale.mat');

    
function CBIG_PlotCorrMatNoOrder(corr_mat, scalelim)

% CBIG_PlotCorrMatNoOrder(corr_mat, scalelim)
%
% This script visualize the ROI2ROI correlation matrix <corr_mat> with given colormap range <scalelim>.
% The script will not perform and reordering but simply visualize correlation matrix as the original
% order.
%
%   - corr_mat: (KxK matrix)
%       The ROI2ROI correlation matrix. 
%
%   - scalelim: ([lim_min limmax])
%       The range of the colormap. The <scalelim> should be a 1x2 vector where <lim_min> and <lim_max>
%       are the mininum and maximum value of the range. By default, <lim_min> is the -1*maximum
%       abosulute value of corr_mat, <lim_max> is the maximum abosulute value of corr_mat.
%
% Examples:
% corr_mat = rand(6,6)-0.5;
% CBIG_PlotCorrMatNoOrder(corr_mat, [-0.5 0.5]);  
%
% Written by Ruby Kong and CBIG under MIT license: https://github.com/ThomasYeoLab/CBIG/blob/master/LICENSE.md

%% load colormap
load('corr_mat_colorscale.mat');

%% plot correlation matrix using imagesc
figure; imagesc(corr_mat); set(gcf,'Colormap',rbmap2);

xlim(gca,[1 size(corr_mat, 1)]);
ylim(gca,[1 size(corr_mat, 1)]);
postn = get(gca, 'Position');
postn(2) = 0.15;
set(gca, 'Position', postn);

%% set colorbar
hcol=colorbar('peer',gca,'SouthOutside','FontSize',15);
cpos=get(hcol,'Position');
cpos(4)=cpos(4)/4; % Halve the thickness
cpos(3)=cpos(3)*0.75; % Reduce length
cpos(1)=cpos(1) + 0.1; % Move it to the center
cpos(2)=cpos(2) - 0.12; % Move it down outside the plot
set(hcol,'Position',cpos);

%% set color limit
if ((nargin < 2) || (isempty(scalelim)))
    collim = max(max(abs(corr_mat)));
    scalelim = [-1*collim, 1*collim];
end