Actually all these functions fread/fileread are not in my code. I guess MATLAB is using it itself.
Basically if you consider fcn.m as the main function and fcn_tb.m as test bench and then open the workflow advisor, then run till the task fixed point conversion. At that time you get this error. I'll post the entire red part.
Error using fileread (line 27) Could not open file variable. No such file or directory.
Error in C:\MatlabR2013a\R2013a\toolbox\coder\float2fixed\+coder\+internal\Float2FixedConverter.p>Float2FixedConverter.buildDesign/getUserWrittenFunction (line 1666)
Error in C:\MatlabR2013a\R2013a\toolbox\coder\float2fixed\+coder\+internal\Float2FixedConverter.p>Float2FixedConverter.buildDesign (line 1654)
Error in C:\MatlabR2013a\R2013a\toolbox\coder\coder\+coderprivate\Float2FixedManager.p>Float2FixedManager.buildFloatingPointCode (line 102)
Error in C:\MatlabR2013a\R2013a\toolbox\coder\coder\private\fpBuildFloatingPointCode.p>fpBuildFloatingPointCode (line 4)
Error in C:\MatlabR2013a\R2013a\toolbox\coder\coder\emlcprivate.p>emlcprivate (line 16)
Could not open file variable. No such file or directory.
Error in fileread at 27
Error in Float2FixedConverter>buildDesign/getUserWrittenFunction at 1666
Error in Float2FixedConverter>buildDesign at 1654
Error in Float2FixedManager>buildFloatingPointCode at 102
Error in fpBuildFloatingPointCode at 4
Error in emlcprivate at 16