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: mvroi_mdsfig_plot_sepstates.m
    path of file: ./repos/CanlabCore/CanlabCore/Visualization_functions
    
    the code of the file until where you have to start completion: function mvroi_mdsfig_plot_sepstates(CLUSTER,CORRELS,SPEC)
% ::
%
%    mvroi_mdsfig_plot_sepstates(CLUSTER,CORRELS,SPEC,DATA.CORRELS.AVGSTATS.sigmat_uncorrected,DATA.CORRELS.DIFSTATS.sigmat_uncorrected,titlestr)
%
% Plots SEPARATE STATES
%
% :Example: 
% ::
%
%    mvroi_mdsfig_plot2(DATA.CLUSTER,DATA.SPEC,DATA.CORRELS.AVGSTATS.sigmat_uncorrected,DATA.CORRELS.DIFSTATS.sigmat_uncorrected,'Uncorrected');
%
scnsize = get(0,'ScreenSize');
figure('position',[50 50 scnsize(3)-100 scnsize(4)/2],'color','white')

nstates = SPEC.numstates;

for i = 1:nstates
    
    subplot(1,nstates,i);
    set(gca,'FontSize',14)
    
    titlestr = SPEC.tasknames{i};
    
    su = CORRELS.STATESTATS(i).sigmat_uncorrected;
    sc = CORRELS.STATESTATS(i).sigmat;

    
function mvroi_mdsfig_plot_sepstates(CLUSTER,CORRELS,SPEC)
% ::
%
%    mvroi_mdsfig_plot_sepstates(CLUSTER,CORRELS,SPEC,DATA.CORRELS.AVGSTATS.sigmat_uncorrected,DATA.CORRELS.DIFSTATS.sigmat_uncorrected,titlestr)
%
% Plots SEPARATE STATES
%
% :Example: 
% ::
%
%    mvroi_mdsfig_plot2(DATA.CLUSTER,DATA.SPEC,DATA.CORRELS.AVGSTATS.sigmat_uncorrected,DATA.CORRELS.DIFSTATS.sigmat_uncorrected,'Uncorrected');
%
scnsize = get(0,'ScreenSize');
figure('position',[50 50 scnsize(3)-100 scnsize(4)/2],'color','white')

nstates = SPEC.numstates;

for i = 1:nstates
    
    subplot(1,nstates,i);
    set(gca,'FontSize',14)
    
    titlestr = SPEC.tasknames{i};
    
    su = CORRELS.STATESTATS(i).sigmat_uncorrected;
    sc = CORRELS.STATESTATS(i).sigmat;
    
    mdsfig(CLUSTER.Gs(:,1:2),CLUSTER.names,CLUSTER.classes,su); 
    title(['State ' num2str(i) ', ' titlestr ' (p < .05 uncorrected)'])
end