Skip to main content

parseElementBoolean.m


% This function is part of the NMSM Pipeline, see file for full license.
%
% This function takes a properly formatted XML file and runs the
% MuscleTendonPersonalization module and saves the results correctly for
% use in the OpenSim GUI.
%
% (string) -> (None)
% Run MuscleTendonPersonalization from settings file


function boolean = parseElementBoolean(tree, childElementName)
try
boolean = strcmp(strtrim(tree.(childElementName).Text), "true");
catch
throw(MException('', strcat("No child element ", childElementName)))
end
end