<div dir="ltr">Hello,<br><br>I've been having this problem when trying to do some grand averages. After loading all my datasets, and when clicking on "precompute channel measures", I get the following error message.<br><br>Unable to write -MAT file C:(...)subject22>after.daterp<div><br></div><div>File may be corrupt<br><br>(Error occured in function std_savedat at line 47)</div><div><br></div><div>I found a similar problem reported in Bugzilla, namely Bug 764, but the savedat function seems to have a fix for that bug. Here's the savedat function code:<br><br>"function std_savedat( tmpfile, structure)</div><div><br></div><div>    delims = find( tmpfile == '.');</div><div>    if ~isfield(structure, 'datafile') && ~isfield(structure, 'datafiles') </div><div>        structure.datafile = [ tmpfile(1:delims(end)-1) '.set' ];</div><div>    end;</div><div>    </div><div>    % fix reading problem (bug 764)</div><div>    tmpfile2  = which(tmpfile);</div><div>    if isempty(tmpfile2), tmpfile2 = tmpfile; end;    </div><div>    tmpfile = tmpfile2;</div><div>    </div><div>    eeglab_options;</div><div>    if option_saveversion6</div><div>        try</div><div>            save('-v6' , tmpfile, '-struct', 'structure');</div><div>        catch</div><div>            fields = fieldnames(structure);</div><div>            for i=1:length(fields)</div><div>                eval([ fields{i} '=structure.'  fields{i} ';']);</div><div>            end;</div><div>            save('-mat', tmpfile, fields{:});</div><div>        end;</div><div><b>    else </b></div><div><b>        save('-v7.3' , tmpfile, '-struct', 'structure'); **line 47</b></div><div>    end;<br>"</div><div><br>Note that my subjects datasets have been processed in another computer however, last week I ran a grand average with files done on that same computer and it worked fine. The MATLAB and eeglab versions on that other computer are the same. This error happens with some datasets, but not with others, so I ignore what could be possibly causing it.<br><br>Thanks for your help,<br><br>Fernanda<br><br><br></div></div>