Hello,
I am fairly new to running simulations while integrating with matlab. I am running a very simple activity diagram that consists of an initial node, an opaque action, and a flow final node. In the opaque action, I am calling a matlab script that attempts to utilize the variables in the variables pane of the simulation window by name. I do know that I have the correct variables running and available, as I am running the activity diagram with context.
However, when my matlab script attempts to access a variable from the cameo simulation (for example: x = my_variable), I receive the error "undefined function or variable 'my_variable' ". I am not sure why this is happening, because my_variable is one of the variables in the simulation window, and I was under the impression that once you run the "matlab.shareEngine" function in the command line window, the matlab workspace and simulation variables were all available for use by either matlab or cameo (depending on what you are trying to do).
Having matlab access and utilize the simulation variables seems like a very trivial task, so I do believe I am missing something pretty basic here, but have been struggling with this problem for a bit, so any help would be fantastic. Thanks.