addObserver
Description
An observer is a type of actor that you can create and add to the MATLAB® cosimulation client in addition to the main actors participating in a scenario. Observers can only read simulation states without modifying them in any way during simulation. The purpose of observers is to allow for custom computations, for example, visualization and runtime analysis of simulation data. For instance, an observer can notice if a vehicle is too close to another vehicle.
adds an observer named observer = addObserver(ScenarioSim,ObserverName,FileName)ObserverName represented by a MATLAB
System object™, or a Simulink® model in the file FileName, to the scenario simulation
ScenarioSim. If the command is successful, then the function returns
logical 1 (true). Otherwise, the function returns logical 0
(false).