How to programmatically get input and output types for C code generation in Matlab Coder?

6 views (last 30 days)
I want to write custom initialization and termination functions in Matlab Coder for C source code generation. I know that I could either use the codegen functionality of using CustomInitializer or CustomTerminator or the Matlab Coder App "Custom Code" tab.
I want to use the input and output variables to the main entry point in codegen or Matlab Coder in the initializer and terminator functions. How could I do that to build a custom toolchain?
Soham Sinha
Soham Sinha on 30 Jun 2021
Thanks for replying.
Yes, I want to access the type and variable names of the generated C function's input and outputs.
The use-case is the following:
I want to use these variable types and names to initialize them in an initializer function or use the output in a terminator function.
I was also thinking of using the global variables to do that. Is it possible to get the global variable name and types and use them in some way in the initializer or terminator function?

Sign in to comment.

Answers (0)


Find more on MATLAB Coder in Help Center and File Exchange




Community Treasure Hunt

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

Start Hunting!

Translated by