# Tutorial 1c – Matlab/Octave limit-state function

In this tutorial we formulate the limit-state function of the problem introduced in Tutorial 1 in Matlab/Octave and use Fesslix to perform the reliability analysis. Subset Simulation is employed to estimate the probability of failure.

This tutorial is based on Tutorial 1b. Please perform Tutorial 1b before you start with this tutorial. The code given in this tutorial (Tutorial 1c) replaces the code given in Section 1.3 of Tutorial 1b. The code given in Sections 1.1 and 1.2 of Tutorial 1b precedes all code given in this tutorial (Tutorial 1c); and the code given in Section 1.4 of Tutorial 1b succeedes all code given in this tutorial (Tutorial 1c).

For this tutorial you must have a 64-bit version of Matlab/Octave installed on your system. Under Windows, the Octave interface is currently not supported.

## 1   Step by Step Instruction ### 1.1   Matlab/Octave function file We begin with the Matlab/Octave limit-state function. We create a file tutorial_1c_lsf.m with content:

Matlab/Octave Code "tutorial_1c_lsf.m"
function [resultScalar] = tutorial_1c_lsf (rvv)

resultScalar = sum(rvv) - 60;

end

### 1.2   Fesslix parameter file (Matlab interface) First, we need to load the Matlab interface in Fesslix:

Fesslix parameter file
matlab_addpath(\$pwd()) { subfolders=true; }; # add current path to the search-path of Matlab

Now, we can link the Matlab limit-state function to Fesslix. In the Fesslix parameter file, we define the var-variable lsf as follows:

Fesslix parameter file
var lsf = matlab_LSF(tutorial_1c_lsf(RVS));

where tutorial_1b_lsf is the name of the Matlab limit-state function to call, and RVS is the set of random variables whose realizations are handed over to Matlab in form of a vector.

### 1.3   Fesslix parameter file (Octave interface) First, we need to load the Octave interface in Fesslix:

Fesslix parameter file

Now, we can link the Octave limit-state function to Fesslix. In the Fesslix parameter file, we define the var-variable lsf as follows:

Fesslix parameter file
var lsf = octave_LSF(tutorial_1c_lsf(RVS));

where tutorial_1b_lsf is the name of the Octave limit-state function to call, and RVS is the set of random variables whose realizations are handed over to Matlab in form of a vector.

## 2   The complete input files of this tutorial fesslix.org – Home  |  Contact  |  Impressum  |  © 2015-2017 Wolfgang Betz