% This function is part of the NMSM Pipeline, see file for full license.
%
% Extracts time vector and data curves from an input data file and
% determines the number of B-spline nodes required to match a
% specified cutoff frequency for all curves.
%
% (Array of double, Array of double, double, double) -> (double)
% Finds the number of nodes needed to spline-fit data with a filter cutoff.
function nNodes = splFitWithCutoff(time, data, fCutoff, splineDegree)
% Extract relevant parameters
params.fCutoff = fCutoff;
params.splineDegree = splineDegree;
params.plotFlag = 0; % Plots not used as this function is called by tools
% Calculate number of B-spline nodes required to match the specific cutoff
% frequently for all curves
nNodes = calcNumBsplNodesFromCutoffFreq(time, data, params);
end