diff --git a/fig_collect.m b/fig_collect.m index 3ad2f43..c95f42e 100644 --- a/fig_collect.m +++ b/fig_collect.m @@ -822,15 +822,16 @@ function timer_Callback(~,~,handles) {'Second'},{handles.settings.labelX},{handles.settings.labelY},{'Button'}; ... {'%%%%%%'},{'%%%%%%'},{'%%%%%%'},{'%%%%%%'}; ... num2cell(mean_ratings)]; - % Create export file - try - writecell(output,fullfile(pathname,filename), ... - 'FileType','text','Delimiter','comma', ... - 'QuoteStrings',true,'Encoding','UTF-8'); - msgbox('Export successful.','Success'); - catch err - errordlg(err.message,'Error saving'); - end + output(cellfun(@(x) any(ismissing(x)), output)) = {''}; + % Create export file + try + writecell(output,fullfile(pathname,filename), ... + 'FileType','text','Delimiter','comma', ... + 'QuoteStrings',true,'Encoding','UTF-8'); + msgbox('Export successful.','Success'); + catch err + errordlg(err.message,'Error saving'); + end end program_reset(handles); % While transitioning or paused diff --git a/fig_review.m b/fig_review.m index 83d47d0..d723d97 100644 --- a/fig_review.m +++ b/fig_review.m @@ -322,6 +322,7 @@ function menu_export_Callback(hObject,~) {'Second'},{handles.labelX},{handles.labelY},{'B'}; ... {'%%%%%%'},{'%%%%%%'},{'%%%%%%'},{'%%%%%%'}; ... num2cell([handles.Seconds,handles.MeanRatingsX,handles.MeanRatingsY,zeros(length(handles.Seconds),1)])]; + output(cellfun(@(x) any(ismissing(x)), output)) = {''}; %Prompt user for output filepath [filename,pathname] = uiputfile({'*.csv','Comma-Separated Values (*.csv)'},'Save as',fullfile(handles.settings.defaultdir,defaultname)); if isequal(filename,0), return; end @@ -382,6 +383,7 @@ function menu_combine_Callback(hObject,~) out = [out; append]; waitbar(f/length(filenames),w); end + out(cellfun(@(x) any(ismissing(x)), out)) = {''}; %Prompt user for output filepath [outfile,outpath] = uiputfile({'*.csv','Comma-Separated Values (*.csv)'},'Save as',fullfile(handles.settings.defaultdir,'Combined.csv')); if isequal(outfile,0), return; end