Hi,
I have som legacy C-code that runs as S-function within a Simulink model. Within this C-code, a text file is read using fopen. As long as the text file is located in the current Matlab directory, the file can be read successfully during simulation.
If the text file is located in some other directory which is included in pathdef.m but not the current directory, it won't be found.
Is there a way to search for the file same as 'which' would do ? All within the S-function.
Thanks in advance.
Best Answer