MATLAB: Getting Error in csvwrite

csvdigital image processingimage processingimage segmentationprogramming

Hello all,
my problem is i am getting error when i wants to write some files in csv format. i am getting error in this line csvwrite(sprintf('Object%d.csv',i), y).dont know why i am getting this error. yesterday it was working well, but when i tried to work it again today, then it starts giving error. kindly guide me.thanks
due to this line 3 kind of errors are generating like:Error using dlmwrite (line 124)
Cannot open file Object1.csv.
Error in csvwrite (line 42)
dlmwrite(filename, m, ',', r, c);
Error in newwwwwwwwwwww (line 62)
csvwrite(sprintf('Object%d.csv',i), y)

Best Answer

csvwrite(sprintf('F:\\kinectdata\\TomatoExtraction\\object%d.csv',i), y)
Or
csvwrite(sprintf('F:/kinectdata/TomatoExtraction/object%d.csv',i), y)
or
projectdir = 'F:\kinectdata\TomatoExtraction';
csvwrite( fullfile(projectd, sprintf('object%d.csv', i)), y)
Related Question