Exchange data between a running Matlab script and Simulink
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
WZ
am 8 Mai 2018
Kommentiert: Ameer Hamza
am 16 Mai 2018
We are students trying to autonomously run a RC car along a pre determined circuit.
The problem we are facing now is the following: We would like to control the car through Simulink (the car is running ROS) and at the same time run a Matlab script that exports its data to Simulink.
The Matlab script receives data from a motion capture system, which is then needed to locate and control the car in Simulink. We tried to use a Matlab function block, but there are commands (like addpath, fullfile) that are not supported in this case.
We are running on Windows.
Does anyone know if it is possible?
0 Kommentare
Akzeptierte Antwort
Ameer Hamza
am 8 Mai 2018
Bearbeitet: Ameer Hamza
am 8 Mai 2018
An easier way is to add a new topic to your system. Create a subscriber in your Simulink model which is listening to data from a specific topic. Then add a publisher of the same topic in your MATLAB script. In that way, the MATLAB script can publish data which then can be received by the subscriber in Simulink and use in processing.
2 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Block Libraries finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!