Exchange data between matlab code and c++ code generated with matlab coder

8 次查看(过去 30 天)
Hi everyone,
As the question says, I'm trying to exchange data between matlab code and c++ code generated with matlab coder.
The idea is simple, I just have a peace of code that analyses some data and creates a complex structure (cell array, with a struct on each cell, which has multiple matrices inside). Afterwards, there is another function that uses this structure to process new data.
My goal is to implement this second function in Matlab and then export it as a C++ function with Matlab coder, and then use the C++ version with an external framework. But I don't know how to transfer the structure between the matlab code (first function) and C++ code (second function). I can split the data into several files, in an adhoc format, write an importer for C++ and then load everything into C++... but I wonder if there is a better way. I tried searching but no luck. The fact that I don't know how to search this question probably doesn't help either... :/
Do you have any idea on how to solve this? Or useful pointers? Thanks! Cheers

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB Coder 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by