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: planqs.m
    path of file: ./repos/calfem-matlab/fem
    
    the code of the file until where you have to start completion:  function [es,et]=planqs(ex,ey,ep,D,ed,eq)
% [es,et]=planqs(ex,ey,ep,D,ed,eq)
%-------------------------------------------------------------
% PURPOSE
%  Calculate element normal and shear stress for a quadrilateral 
%  plane stress or plane strain element.
%
% INPUT:  ex = [x1 x2 x3 x4]      element coordinates
%         ey = [y1 y2 y3 y4]
%
%         ep = [ptype t ]         ptype: analysis type
%                                 t:  thickness
%                                
%         D                       constitutive matrix
%
%         ed = [u1 u2 ..u8;       element displacement vector
%               ..........]       one row for each element
%
%         eq = [bx;               bx: body force in x direction
%               by]               by: body force in y direction
%
% OUTPUT: es = [ sigx sigy [sigz] tauxy    element stress matrix
%                  ......              ]   one row for each element
%         et = [ epsx epsy [epsz] gamxy    element strain matrix
%                  ......              ]   one row for each element
%-------------------------------------------------------------

% LAST MODIFIED: M Ristinmaa   1995-10-25
% Copyright (c)  Division of Structural Mechanics and
%                Department of Solid Mechanics.
    
function [es,et]=planqs(ex,ey,ep,D,ed,eq)
% [es,et]=planqs(ex,ey,ep,D,ed,eq)
%-------------------------------------------------------------
% PURPOSE
%  Calculate element normal and shear stress for a quadrilateral 
%  plane stress or plane strain element.
%
% INPUT:  ex = [x1 x2 x3 x4]      element coordinates
%         ey = [y1 y2 y3 y4]
%
%         ep = [ptype t ]         ptype: analysis type
%                                 t:  thickness
%                                
%         D                       constitutive matrix
%
%         ed = [u1 u2 ..u8;       element displacement vector
%               ..........]       one row for each element
%
%         eq = [bx;               bx: body force in x direction
%               by]               by: body force in y direction
%
% OUTPUT: es = [ sigx sigy [sigz] tauxy    element stress matrix
%                  ......              ]   one row for each element
%         et = [ epsx epsy [epsz] gamxy    element strain matrix
%                  ......              ]   one row for each element
%-------------------------------------------------------------

% LAST MODIFIED: M Ristinmaa   1995-10-25
% Copyright (c)  Division of Structural Mechanics and
%                Department of Solid Mechanics.
%                Lund Institute of Technology
%-------------------------------------------------------------

if size(ex,1)~=1 
  error('Error ! PLANQS: only one element at the time');
  return
end