- You can have a C code in the system path and call it while executing the MATLAB code. You may find the documentation on Call C/C++ Code from MATLAB Code helpful if you take this approach.
- Another way could be to have everything inside Simulink and call the C code using MATLAB Function block. You can then connect the outputs of the block to Scope to generate graphs. You may find the documentation on Integrate C Code by Using the MATLAB Function Block helpful if you take this particular approach.
Get data from hardware using C and process it in MATLAB in real time
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Kishore Kumar
am 8 Okt. 2021
Kommentiert: jalil ur rehman kazim
am 13 Aug. 2022
I have a C program that output 10200 bytes of data by communicating with an hardware. I want to process the data in matlab, plot it and refetch new set of value and process it in realtime in a loop. I want to update the graph in realtime. How to obtain otuput of c program in matlab. I use Eclipse IDE for C programming.
What is the best way to do it?
The hardware is a FTDXX device that brings data from a sensor.
0 Kommentare
Akzeptierte Antwort
Tanmay Das
am 13 Okt. 2021
Hi,
To my understanding, you want to use the outputs returned by the C code to generate plots in MATLAB. There can be two possible ways by which you can do that:
0 Kommentare
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu MATLAB Compiler finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!