Page 3 - Demo
P. 3
Interface to Matlab%uf09f%uf09fRCPConsult2017-2025Page 33.RegisterMatlabspecific dynamic library libeng.dllin STRURELenvironmentFor final binding of STRURELand Matlabyou need to registerlibeng.dllin each STRURELmodule (e.g. Comrel).Press key F2inSTRURELmodule to open the PreferencesDialog Box. Go to position Standard Add-onsand check whether this dll is registered.It is also very important that the Matlabis registered as an Automation Server.If a Matlabinstallation,system runtime environment and binding to STRURELare ready you can start to use the MatlabInterface.4.Interaction between STRURELand MatlabThe major kind of communication with theMatlabInterface is usage of script fileswith extension %u2019.m%u2019. Two types of scripts are implemented.The first typeof script describes a real functionwith a single argument as a vector containing mean values of all stochastic variables and fixed values of all deterministic parameters, as is ordered in Stochastic Model of STRUREL. If the functionis run from the GUI for testing and debugging the stochastic variables are set to the mean values. The return value of this functionis a partialor complete evaluation of theState Function in Symbolic Expression of STRURELjob.The second type of script may contain any set of commands in notation of Matlablanguage. Such a script must have a statement defining variable %u2019res%u2019 as a final return value. Usually, this statement is the last one. We recommend using thefirst type of script, because a description of functionwill be loaded and parsed by engine once. Then, on runtime, it will be just evaluated numerically. The second kind of script requires loading and parsing of its content by the engine runtime for each call of evaluation. This slows down computation.