valueOrZero.m
% This function is part of the NMSM Pipeline, see file for full license.
%
% This function takes a struct and a fieldname and returns either the value
% or the number zero
%
% (struct, string) -> (Any)
% Returns the value of the field or the number zero
function output = valueOrZero(inputStruct,fieldName)
if(isfield(inputStruct, fieldName))
output = inputStruct.(fieldName);
else
output = 0;
end
end