- Refactor your code so it doesn't use tables
- Tell MATLAB to use the interpreter (and not code generation) to run your function. This will be acceptable only if you don't plan on running your model outside the MATLAB environment, i.e., you're won't be generating code from the whole model.
- Call the whole function using an "Interpreted MATLAB Function" block, or
- Put all the table-related code in a separate "helper" function and force this function to be run by the MATLAB interpreter by using coder.extrinsic.