# How to employ a MATLAB limit state function in STRUREL?

subject area
in short

By means of the STRUREL command matlabs, you can integrate any limit state function written in MATLAB directly in your structural reliability analysis performed with STRUREL. All you need on your system is: (i) a working MATLAB engine and (ii) the MATLAB interface of STRUREL.

The MATLAB script should be placed inside the same folder that also contains your STRUREL project files and should be given a clear and short name; e.g., 'my_model.m'. An example MATLAB script file is:

function [lsfval] = my_model(INPUT)

  global R;   global S;

  lsfval = R - S

end

where the names of the global variables R and S must match the names of the random variables of the stochastic model of STRUREL. Alternatively, the limit state function above can also be expressed as:

function [lsfval] = my_model(INPUT)

  lsfval = INPUT(1) - INPUT(2)

end

assuming that R is the first random variable in the stochastic model of STRUREL and S is the second random variable.

In STRUREL, you need to define all random variables used in the MATLAB script file (as part of the Stochastic Model). The limit state function is then linked to the MATLAB script file 'my_model.m' using the STRUREL command matlabs:

FLIM(1) = matlabs("my_model")

tags
Contact us
Eracons GmbH