Clear Filters
Clear Filters

Info

This question is closed. Reopen it to edit or answer.

Access the time stamp of a matrix in a from workspace block / do sth when time reaches

1 view (last 30 days)
I am currently experimenting with level-2 S-functions in order to eventually be able to change a workspace variable according to a value from a measurement unit during simulation. Right now I just have a 'from workspace' block having its input as a matrix [t x y] and I pass it through an S-function block (containing a simple function) to a 'to workspace' block. What I want to do is to have the function do something when the time reaches a certain value but I cannot figure out how to access the time stamp in my input data. From what I got , block.InputPort(1).Data(1) is my x and block.InputPort(1).Data(2) is my y. What kind of command syntax do I need to read the t and do actions accordingly?

Answers (0)

This question is closed.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!