I am trying to run MatLab Coder to transform a matlab .m file into .mex to hopefully run the code more quickly. When trying to build the file via MatLab Coder engine, I get the following error:
Undefined function or variable 'k'. The first assignment to a local variable determines its class.
k is determined inside a previous loop. My guess is that C code cannot "remember" values inside an earlier loop. How can I come around this?
Any help is appreciated.
Thanks.