codegen -args {example_inputs} what should example_inputs be for MWArray args

8 visualizaciones (últimos 30 días)
I use codegen to generate C code from Matlab code. according to codegen syntax, I need to put examples of function arguments in codegen -args {example_inputs}
My simple question is if the arguments for the function I want to use are MWArray (dimension and size are unspecified), how should I specify example_inputs as the args example?
Thanks for the help!

Respuestas (1)

Walter Roberson
Walter Roberson el 29 de Oct. de 2016
If you need to generate C code to handle a variable number of dimensions, you should probably recode to reshape your into into two dimensions and process that.
You will need to tell the code generator what the data type is -- codegen generates specialized code for each combination of data types.
Are you currently using coder.varsize() ?

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by