Integrating C code into MATLAB

20 次查看(过去 30 天)
Jesvin Jose
Jesvin Jose 2022-3-21
Hi all,
I am struggling to merge a c code into matlab I have tried many methods but nothing seems to works. I have attached a copy of the c code along with its header files (it is a Battery management system) which run of an can bus. There are three outputs which are readings of the voltage across cell, temperature and the Module.
Thank you in advance :)
  5 个评论
Jesvin Jose
Jesvin Jose 2022-3-21
I want the C code array processed and stored in MATLAB. Would that be possible?
Jan
Jan 2022-3-21
Yes, it is possible. The C code contains serveral function. It is not clear how they have to be called and what you want to export as output.

请先登录,再进行评论。

回答(1 个)

Kumar Pallav
Kumar Pallav 2022-3-23
Hi,
You can use 'coder.ceval' to call C/C++ function from MATLAB code. Please refer examples mentioned in this documenation for details.
Hope this helps!

类别

Help CenterFile Exchange 中查找有关 Arduino Hardware 的更多信息

产品


版本

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by