I have a struct with very large arrays in it. I use MATLAB coder to generate C code.
In my generated code I wish to call some C function and pass by reference one of the arrays.
For example:
coder.ceval('Foo',coder.ref(MyStruct.VeryLargeArray));
This is not allowed by MATLAB coder and I get the error:
coder.ref may only be applied to an expression of the type V or V(E) ...
Since MyStruct.VeryLargeArray is very large, as the name suggests, I wish to avoid the abvious solution of copying it to a temporary varliable:
UnnecessaryTempVar = MyStruct.VeryLargeArray;
coder.ceval('Foo',coder.ref(UnnecessaryTempVar));
Any ideas for a workaround?