Simulink output matrix in real time
Show older comments
Hello everyone, I try to use Simulink to output matrix recorded in workspace in real time.
For example, my matrix is 4*6 matrix.
The first second, the output is first row of my matrix, which is 1*6 matrix.
The second second, the output is second row of my matrix, which is 1*6 matrix.
...
Until every row in my matrix is finished to be read.
Does anyone know how to realize it? Any ideas is appreciated!!
4 Comments
Walter Roberson
on 18 Sep 2017
Outputing to the workspace implies that something is running that could read it, but Simulink keeps running unless you ask for it to pause. What were you hoping to be able to do with the variable written in real time?
xuxin wang
on 19 Sep 2017
xuxin wang
on 19 Sep 2017
Walter Roberson
on 19 Sep 2017
The robot would not be able to read the data from the workspace until Simulink stopped running. If you have the I/O for the robot running in a parallel thread then the data would have to be sent to that parallel thread, which can be done by a MATLAB Function Block
You should be considering using the Robotics toolbox to send messages to the robot, or using the a MATLAB Function Block to fprintf() to the device the robot is listening on.
Answers (0)
Categories
Find more on Array and Matrix Mathematics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!