So Matlab had some training in my school ’ Classify ECG Signals Using LSTMs’

They used an ECG data comes from the PhysioNet 2017 Challenge

After training, the accuracy was low, hence they decided on feature extraction. They decided on computes time-frequency (TF) moments

- Instantaneous frequency (instfreq)
- Spectral entropy (pentropy)

calculateFeatures = true;

if calculateFeatures

instfreqTrain = cellfun(@(x)instfreq(x,fs)’,XTrain,‘UniformOutput’,false);

instfreqTest = cellfun(@(x)instfreq(x,fs)’,XTest,‘UniformOutput’,false);

pentropyTrain = cellfun(@(x)pentropy(x,fs)’,XTrain,‘UniformOutput’,false);

pentropyTest = cellfun(@(x)pentropy(x,fs)’,XTest,‘UniformOutput’,false);

else

load ExtractedFeatures.mat

end

XTrain2 = cellfun(@(x,y)[x;y],instfreqTrain,pentropyTrain,‘UniformOutput’,false);

XTest2 = cellfun(@(x,y)[x;y],instfreqTest,pentropyTest,‘UniformOutput’,false);

Can someone please help explain the code below and why both functions needed to be applied instead of 1