You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: extractBandsLin.m
    path of file: ./repos/Kaggle-EEG/@featuresObject
    
    the code of the file until where you have to start completion: function [bandsLin2D, bandsLinAv, ...
    mB2D, mBAv, ...
    names2D, namesAv, ...
    namesmB2D, namesmBAv] = extractBandsLin(data, params)
% Do FFT over whole segement and return average bin power
% Later maybe add time divisions

% Delta: 1-3Hz
% Theta: 4-7Hz
% Alpha1: 8-9Hz
% Alpha2: 10-12Hz
% Beta1: 13-17Hz
% Beta2: 18-30Hz
% Gamma1: 31-40Hz
% Gamma2: 41-50Hz
% Higher: 51->200 Hz
bLims = [[1;3], [4;7], [8;9], [10;12], [13;17], [18;30], [31;40], ...
    [41;50], [51;70], [71;150], [151;250]]; % Last 3 mod M37
nBands = size(bLims,2);
nChans = 16;

bands2D = NaN(nBands, 16, 'single');

mB2D =  NaN(1, 16, 'single');

for c = 1:nChans

    
function [bandsLin2D, bandsLinAv, ...
    mB2D, mBAv, ...
    names2D, namesAv, ...
    namesmB2D, namesmBAv] = extractBandsLin(data, params)
% Do FFT over whole segement and return average bin power
% Later maybe add time divisions

% Delta: 1-3Hz
% Theta: 4-7Hz
% Alpha1: 8-9Hz
% Alpha2: 10-12Hz
% Beta1: 13-17Hz
% Beta2: 18-30Hz
% Gamma1: 31-40Hz
% Gamma2: 41-50Hz
% Higher: 51->200 Hz
bLims = [[1;3], [4;7], [8;9], [10;12], [13;17], [18;30], [31;40], ...
    [41;50], [51;70], [71;150], [151;250]]; % Last 3 mod M37
nBands = size(bLims,2);
nChans = 16;

bands2D = NaN(nBands, 16, 'single');

mB2D =  NaN(1, 16, 'single');

for c = 1:nChans

    Fs = 400;
    T = 1/Fs;
    L = size(data,1);
    
    Y = fft(data(:,c));
    
    P2 = abs(Y/L);
    P1 = P2(1:L/2+1);
    P1(2:end