codegen -args {example_inputs} what should example_inputs be for MWArray args
8 次查看(过去 30 天)
显示 更早的评论
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!
0 个评论
回答(1 个)
Walter Roberson
2016-10-29
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.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!