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: eldisp3.m
    path of file: ./repos/calfem-matlab/fem
    
    the code of the file until where you have to start completion: function [magnfac]=eldisp3(ex,ey,ez,ed,plotpar,magnfac)
%eldisp3(ex,ey,ez,ed,plotpar,magnfac)
%[magnfac]=eldisp3(ex,ey,ez,ed)
%-------------------------------------------------------------
% PURPOSE 
%   Draw the deformed 3D mesh for a number of elements of 
%   the same type. Supported elements are:
% 
%     1) -> bar element              2) -> beam el.
%  
%  to be supported:[ 3) -> tetraheder 4 node el.  4) -> brick 8 node el.]

    
function [magnfac]=eldisp3(ex,ey,ez,ed,plotpar,magnfac)
%eldisp3(ex,ey,ez,ed,plotpar,magnfac)
%[magnfac]=eldisp3(ex,ey,ez,ed)
%-------------------------------------------------------------
% PURPOSE 
%   Draw the deformed 3D mesh for a number of elements of 
%   the same type. Supported elements are:
% 
%     1) -> bar element              2) -> beam el.
%  
%  to be supported:[ 3) -> tetraheder 4 node el.  4) -> brick 8 node el.]
%
%  INPUT
%    ex,ey:.......... nen:   number of element nodes
%                     nel:   number of elements   
%    ed:     element displacement matrix
%
%    plotpar=[  linetype, linecolor, nodemark] 
%
%             linetype=1 -> solid    linecolor=1 -> black
%                      2 -> dashed             2 -> blue
%                      3 -> dotted             3 -> magenta
%                                              4 -> red
%             nodemark=1 -> circle       
%                      2 -> star              
%                      0 -> no mark 
%
%    magnfac:  magnification factor for displacements 
%            
%    Rem. Default is auto magnification and solid white lines with 
%         circles at nodes if magnfac and plotpar is left out
%-------------------------------------------------------------

% LAST MODIFIED: A Olsson 2004-09-03
% Copyright (c)  Division of Structural Mechanics and
%                Division of Solid Mechanics.
%                Lund University
%-------------------------------------------------------------
%
 if ~((nargin==4)|(nargin==5)|(nargin==6))
    disp('??? Wrong number of input arguments!')
    return
 end