Info
此问题已关闭。 请重新打开它进行编辑或回答。
Access the time stamp of a matrix in a from workspace block / do sth when time reaches
1 次查看(过去 30 天)
显示 更早的评论
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?
0 个评论
回答(0 个)
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!