function features = makeMSFModes(trials,CV,command)
%%%  features = makeMSFModes(trials,CV)
%%%   trials: ntasks x ntrials cell array of data
%%%   CV.parms contains
%%%           .nlags
%%%           .winSize
%%%           .winShift
%%%   features: ntasks x ntrials cell array of featurized data

if nargin > 2 && strcmp(command,'make')
  features = CV;
  return;
end

nlags = CV.parms.nlags;
winSize = CV.parms.winSize;
winShift = CV.parms.winShift;
meanSubtract = CV.parms.meanSubtract;

features = msfize(windowize(lagize(trials,nlags),winSize,winShift),...
    meanSubtract);
