function exportSCaseData(filename) % Export a file (csv or excel) of all of the SCase measurements % % Inputs: file name with desired extenstion like "shoulder.csv" % % Output: A (csv or excel)file as specified in the input in the specified directory (current directory if not specified) % % Example: exportSCaseData("shoulder.csv"); % addpath(genpath('ShoulderCase')); database = ShoulderCaseLoader; allCases = database.loadAllCases(); % SCaseTable initialised arbitrarily with the first SCase loaded SCaseTable = allCases(1).SCaseDataToTable(); for i = 2:length(allCases) SCaseTable = outerjoin(SCaseTable, allCases(i).SCaseDataToTable(), 'MergeKeys', true); end writetable(SCaseTable, filename); end