MATLAB: Does CSVWRITE fail on Linux

dlmwriteMATLAB

I am invoking CSVWRITE from my M-function that should write to a file. The function runs fine on Windows. On Linux however, I get the following error:
dlmwrite in 126: Could not open file

Best Answer

The directory that is to contain the output file of CSVWRITE must have write permissions set for the user. Run the Unix CHMOD command to enable write permissions for the user, for the target directory.