How to use in-line Matlab in Strurel

In the last post, we showed you how to work with in-line Python functions directly in STRUREL. Did you know? You can also use in-line Matlab functions directly in a symbolic expression in STRUREL.

For example, assume a problem for which you have the two random variables R and S in your stochastic model, where R represents the resistance of a system of interest and S is the system load. The symbolic expression for the corresponding limit-state function in the native syntax of STRUREL would be:

FLIM(1) = R-S

However, if you have Matlab installed on your system and if the Matlab interface of STRUREL is configured correctly, you could also use the following expression:

FLIM(1) = matlabf("R-S")

Sure, calling the Matlab interpreter for this simple demonstration example is like taking a sledgehammer to crack a nut. However, the interface-function matlabf is a tool that gives you access to the full power of Matlab directly in the symbolic expression of STRUREL.