I want to integrate external C code with Simulink using the Legacy Code Tool. The output array size from C function should be variable, and need to be specified in Simulink, but not in the Legacy Code Tool. Unfortunately, it will throw an error if the array size of the outpus is undefined:
Error using legacycode.LCT.legacyCodeImpl
An output or a work dimension must be fully specified:
–> myCfun(single u1[],uint16 u2, single u3, single u4, single u5[], single y1[])
Is there a way to integrate external C code with variable vector as output using Legacy code tool?
Best Answer