I am the one who posted this question, and I found the solution. So, i thought I should share it here.
The problem was due to path/working directory in MATLAB interface (not simulink). When I give path in MATLAB, which is different from the location of the simulink code, then did not see error. One more thing, do not give path (in MATLAB) or folder location, which is in very deep. For example: you can give location of the first folder of your C or D or E drive in your computer.
I Hope this will help.