Hello, I am using fprintf to output variables of several different classes into a .csv file. I am using the following approach;
somedata={x x; x x; x x;};[nrows ~] = size(somedata);fid = fopen('myfile.csv','w');for ii=1:nrows fprintf(fid,'%f %f\n',somedata{ii,:}endfclose(fid)
When I go to open the .csv file in Excel, it claims that the file is locked for editing by 'another user'. I presume Matlab still has the file in memory or something which is making Excel cry.
How do I correct this?
thanks, Alex
Best Answer