I am using embedded coder to generate c-code from my MATLAB function. I am also using -double2single option for the codegen command. In my coder.SingleConfig object I define a testbench. The file of the testbench is in a subdirectory of my project (I added the subdirectory to my working directory with addpath(...)).
When I start code generation process it can not find the testbench. I always get the message "Could not open file <path to testbench>. No such file or directory." I also changed the name to the absolute testbench file path, but it still can not find the file. Instead it even removed the subdirectory name from the path and tried to look for the file in the root of my working directory.
How can I tell MATLAB to use the testbench file in the subdirectory?