diff --git a/SaveTranscriptions.m b/SaveTranscriptions.m index 0e1d4e2b02e3fe32744c00eff3ce67f0eee56a90..60c46fa73917016de9e161fb45dfc1412ef94f2f 100644 --- a/SaveTranscriptions.m +++ b/SaveTranscriptions.m @@ -22,13 +22,17 @@ reviewerInit = input('Please enter your initials: ', 's'); % Save latest transcription and progress uisave({'lss', 'remainingFiles', 'reviewerInit'}, '*.mat') -% ['lss_' reviewerInit '.mat'] %% Functions function ls = CheckmiscLS(miscLS) -ls = []; -if isempty(miscLS); return; end + +if isempty(miscLS); error('No valid ls transcription file was found in the workspace. Please check that the file has been exported from the application.'); end +if length(miscLS) == 1 + ls = string(miscLS); + fprintf('Variable %s will be used as the user transcription variable.\n', ls) + return +end fprintf(2, 'Warning: multiple potential ''ls'' files were found in the work space. \n\n') @@ -45,10 +49,10 @@ while true userResp = input('Resp:'); if any(ismember(validResp, userResp)) - fprintf('%s has been selected.', lsNames(userResp)) + fprintf('%s has been selected.\n', lsNames(userResp)) break else - fprintf('%i is an invalid response.', userResp) + fprintf('%i is an invalid response.\n', userResp) end end