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: mdsfig_3d.m
    path of file: ./repos/CanlabCore/CanlabCore/Visualization_functions
    
    the code of the file until where you have to start completion: function mdsfig_3d(X,names,clus,linemat,cordir)

    
function mdsfig_3d(X,names,clus,linemat,cordir)
% ::
%
%    mdsfig_3d(X,names,clus,linemat,cordir)
%
% 3-D MDS figure
%
% Subfunction of mdsfig used if 3+ dims are available

numel=size(X,1); %%% define scaling %%%%%%%
a=X(:,1);b=X(:,2);c=X(:,3);
axa=ones(numel,1)*mean(a);
axb=ones(numel,1)*mean(b);
axc=ones(numel,1)*mean(c);
axa1=min(a):(max(a)-min(a))/(numel-1):max(a);
axb1=min(b):(max(b)-min(b))/(numel-1):max(b);
axc1=min(c):(max(c)-min(c))/(numel-1):max(c);

%%% plotting defaults %%%%
f1=figure('Color','w');
hold on;
set(gca,'FontSize',12);
colors = {'ro' 'go' 'bo' 'yo' 'co' 'mo' 'ko' 'r^' 'g^' 'b^' 'y^' 'c^' 'm^' 'k^'};
while max(clus) > length(colors), colors = [colors colors];,end