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: bar1ws.m
    path of file: ./repos/calfem-matlab/fem
    
    the code of the file until where you have to start completion:  function [es,edi,eci]=bar1ws(ex,ep,ed,eq,n)
% es=bar1ws(ex,ep,ed)
% es=bar1ws(ex,ep,ed,eq)
% [es,edi]=bar1ws(ex,ep,ed,eq,n)
% [es,edi,eci]=bar1ws(ex,ep,ed,eq,n)
%-------------------------------------------------------------------------
%    PURPOSE
%      Compute section forces in a one dimensional bar element
%      with elastic support. 
% 
%    INPUT:  ex = [x1 x2]      element node coordinates
%
%            ep = [E A ka]     element properties,
%                                E: Young's modulus
%                                A: cross section area
%                                ka: axial foundation stiffness
%
%            ed = [u1 u2]      element displacement vector
%
%            eq = [qx]         distributed load, local direction
    
function [es,edi,eci]=bar1ws(ex,ep,ed,eq,n)
% es=bar1ws(ex,ep,ed)
% es=bar1ws(ex,ep,ed,eq)
% [es,edi]=bar1ws(ex,ep,ed,eq,n)
% [es,edi,eci]=bar1ws(ex,ep,ed,eq,n)
%-------------------------------------------------------------------------
%    PURPOSE
%      Compute section forces in a one dimensional bar element
%      with elastic support. 
% 
%    INPUT:  ex = [x1 x2]      element node coordinates
%
%            ep = [E A ka]     element properties,
%                                E: Young's modulus
%                                A: cross section area
%                                ka: axial foundation stiffness
%
%            ed = [u1 u2]      element displacement vector
%
%            eq = [qx]         distributed load, local direction
%
%            n : number of evaluation points ( default=2 )
%          
%    OUTPUT: es = [N1;
%                  N2]       element forces, local directions 
%
%            edi = [ u1 ;    element displacements, local directions,
%                    u2 ;    in n points along the bar, dim(es)= n x 1
%                   .......]    
%
%            eci = [ x1  ;      local x-coordinates of the evaluation 
%                    x2 ;       points, (x1=0 and xn=L)
%                    ...]
% -------------------------------------------------------------------------
 
% LAST MODIFIED: O Dahlblom  2021-02-25
% Copyright (c)  Division of Structural Mechanics and
%                Division of Solid Mechanics.
%                Lund University
%--------------------------------------------------------------------------
  if length(ed(:,1)) > 1 
     disp('Only one row is allowed in the ed matrix !!!')
     return
  end