(Enhancement Request)how to Create data files that the generated code reads at run time to support C/C++ code generation?

1 次查看(过去 30 天)
As far as I know, coder.write and coder.read are functions that support serialisation/deserialisation at runtime in R2023a. coder.read supports C/C++ code generation, but unfortunately coder.write does not, and can only be used in a MATLAB environment. This has caused me difficulties as there are many complex structures that need to be dynamically saved and loaded during the running of my program. Hopefully future versions will enhance coder.write with C/C++ code support.

采纳的回答

Nathan S
Nathan S 2023-4-21
Thanks for letting us know that you would like this functionality!
We will use this request to prioritize this feature in the future. In the meantime, you can use fwrite or fprintf (although they obviously are much more cumbersome for complex structures)
  1 个评论
cui,xingxing
cui,xingxing 2023-4-22
Thanks for your support in this area, I had to abandon coder.write/coder.read in my previous problem, unfortunately they don't support both C/C++ code generation. I also tried to use the lower-level functions (fwrite/fread) to write generic arrays of structures, but contrary to coder.write/coder.read, the "read" functions I wrote myself do not support C/C++ code generation, while "write" does. but "write" can support c/c++ code generation. In short, the ideal result of simultaneous support is not achieved.

请先登录,再进行评论。

更多回答(0 个)

类别

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

产品


版本

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by