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: secforce2.m
    path of file: ./repos/calfem-matlab/fem
    
    the code of the file until where you have to start completion: function [sfac]=secforce2(ex,ey,es,plotpar,sfac,eci)
%secforce2(ex,ey,es,plotpar,sfac)
%secforce2(ex,ey,es,plotpar,sfac,eci)
%[sfac]=secforce2(ex,ey,es)
%[sfac]=secforce2(ex,ey,es,plotpar)
%
%--------------------------------------------------------------------------
% PURPOSE: 
%  Draw section force diagram for a two dimensional bar or beam element.
%  	
% INPUT:
%	ex = [ x1 x2 ]
%	ey = [ y1 y2 ]	element node coordinates.
%
%	es = [ S1;
%          S2;
%		... ] 	vector containing the section force
%			in Nbr evaluation points along the element.
%	
%    plotpar=[linecolour, elementcolour] 
%
%            linecolour=1 -> black     elementcolour=1 -> black
%                       2 -> blue                    2 -> blue
%                       3 -> magenta                 3 -> magenta
%                       4 -> red                     4 -> red
%
%	sfac = [scalar]	scale factor for section force diagrams.
%

    
function [sfac]=secforce2(ex,ey,es,plotpar,sfac,eci)
%secforce2(ex,ey,es,plotpar,sfac)
%secforce2(ex,ey,es,plotpar,sfac,eci)
%[sfac]=secforce2(ex,ey,es)
%[sfac]=secforce2(ex,ey,es,plotpar)
%
%--------------------------------------------------------------------------
% PURPOSE: 
%  Draw section force diagram for a two dimensional bar or beam element.
%  	
% INPUT:
%	ex = [ x1 x2 ]
%	ey = [ y1 y2 ]	element node coordinates.
%
%	es = [ S1;
%          S2;
%		... ] 	vector containing the section force
%			in Nbr evaluation points along the element.
%	
%    plotpar=[linecolour, elementcolour] 
%
%            linecolour=1 -> black     elementcolour=1 -> black
%                       2 -> blue                    2 -> blue
%                       3 -> magenta                 3 -> magenta
%                       4 -> red                     4 -> red
%
%	sfac = [scalar]	scale factor for section force diagrams.
%
%   eci = [  x1;
%            x2;
%           ... ]  local x-coordinates of the evaluation points (Nbr).
%       If not given, the evaluation points are assumed to be uniformly
%       distributed
%
%--------------------------------------------------------------------------

% LAST MODIFIED: O Dahlblom  2019-12-16
% Copyright (c)  Division of Structural Mechanics and
%                Division of Solid Mechanics.
%                Lund University
%--------------------------------------------------------------------------

 if ~((nargin==3)|(nargin==4)|(nargin==5)|(nargin==6))
    disp('??? Wrong number of input arguments!')
    return
 end