How do I use coder.varsize() and coder.typeof()?

2 views (last 30 days)
Om
Om on 18 Jun 2014
I'm trying to understand how to use coder.varsize() along with coder.typeof() for codegen. I initialize a large and complicated structure in functionA and some fields of this structure are variable sized. I declare them as variable sized using coder.varsize(), and this structure is an input to functions (functionB) from which I could like to put through codegen. I tried to used coder.typeof() on the output of the functionA to specify the input arguments for functionB with the -args flag, but the generated code doesn't have the variable sized fields that I needed!
What am I doing wrong?
Thanks

Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!