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: ex_spanner.m
    path of file: ./repos/featool-multiphysics/examples
    
    the code of the file until where you have to start completion: function [ fea, out ] = ex_spanner( varargin )
%EX_SPANNER STL geometry import and stress calculation of a spanner.
%
%   [ FEA, OUT ] = EX_SPANNER( VARARGIN ) Example to import a STL CAD
%   geometry and calculate displacements on a fixed spanner. The load
%   force may be distributed in the tangential load direction with the
%   force fraction parameter FRAC.
%
%   Accepts the following property/value pairs.
%
%       Input       Value/{Default}        Description
%       -----------------------------------------------------------------------------------
%       E           scalar {190e3}         Modulus of elasticity [N/mm^2]
%       nu          scalar {0.29}          Poissons ratio
%       force       scalar {1000}          Load force [N]
%       frac        scalar {0}             Fraction of stress against pulling direction
%       sfun        string {sflag1}        Shape function for displacements
%       iplot       scalar 0/{1}           Plot solution (=1)
%                                                                                         .
%       Output      Value/(Size)           Description
%       -----------------------------------------------------------------------------------
%       fea         struct                 Problem definition struct
%       out         struct                 Output struct

% Copyright 2013-2023 Precise Simulation, Ltd.


cOptDef = { 'E',        190e3;
            'nu',       0.29;
            'force',    1000;
            'frac',     0;

    
function [ fea, out ] = ex_spanner( varargin )
%EX_SPANNER STL geometry import and stress calculation of a spanner.
%
%   [ FEA, OUT ] = EX_SPANNER( VARARGIN ) Example to import a STL CAD
%   geometry and calculate displacements on a fixed spanner. The load
%   force may be distributed in the tangential load direction with the
%   force fraction parameter FRAC.
%
%   Accepts the following property/value pairs.
%
%       Input       Value/{Default}        Description
%       -----------------------------------------------------------------------------------
%       E           scalar {190e3}         Modulus of elasticity [N/mm^2]
%       nu          scalar {0.29}          Poissons ratio
%       force       scalar {1000}          Load force [N]
%       frac        scalar {0}             Fraction of stress against pulling direction
%       sfun        string {sflag1}        Shape function for displacements
%       iplot       scalar 0/{1}           Plot solution (=1)
%                                                                                         .
%       Output      Value/(Size)           Description
%       -----------------------------------------------------------------------------------
%       fea         struct                 Problem definition struct
%       out         struct                 Output struct

% Copyright 2013-2023 Precise Simulation, Ltd.


cOptDef = { 'E',        190e3;
            'nu',       0.29;
            'force',    1000;
            'frac',     0;
            'sfun',     'sflag1';
            'iplot',    1;
            'fid',      1 };
[got,opt] = parseopt(cOptDef,varargin{:});


% Define scaling factor m to mm.
USE_METERS = true;
s = double( ~USE_METERS + USE_METERS*1e-3 );


% Import (and scale) grid.
fea.sdim = {'x','y','z'};
fea.geom = impexp_stl( 'spanner1.stl', 'import', [], 'solid', 2, 'extend