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: pca.m
    path of file: ./repos/hctsa/Toolboxes/OpenTSTOOL/tstoolbox/@signal
    
    the code of the file until where you have to start completion: function [rs, eigvals, eigvecs] = pca(s, mode, maxpercent)

%tstoolbox/@signal/pca
%   Syntax:
%     * [rs, eigvals, eigvecs] = pca(s) => mode='normalized' , maxpercent
%       = 95
%     * [rs, eigvals, eigvecs] = pca(s, mode) => maxpercent = 95
%     * [rs, eigvals, eigvecs] = pca(s, mode, maxpercent)
%
%   Input arguments:
%     * each row of data is one 'observation', e.g. the sample values of
%       all channels in a multichannel measurement at one point in time
%     * mode can be one of the following : 'normalized' (default), 'mean',
%       'raw'
%          + in mode 'normalized' each column of data is centered by
%            removing its mean and then normalized by dividing through its
%            standard deviation before the covariance matrix is calculated
%          + in mode 'mean' only the mean of every column of data is
%            removed
%          + in mode 'raw' no preprocessing is applied to data
%     * maxpercent gives the limit of the accumulated percentage of the
%       resulting eigenvalues, default is 95 %
%
%   Principal component analysis of column orientated data set.
%
% Copyright 1997-2001 DPI Goettingen, License http://www.physik3.gwdg.de/tstool/gpl.txt

%
%   principal component analysis of column orientated data set <data>
%   
%   input arguments :
%
%   - each row of data is one 'observation', e.g. the sample values of
%     all channels in a multichannel measurement at one point in time
%
%   - mode can be one of the following : 'normalized' (default), 'mean', 'raw'
%     - in mode 'normalized' each column of data is centered by removing its mean
%       and then normalized by dividing through its standard deviation before
%       the covariance matrix is calculated
%     - in mode 'mean' only the mean of every column of data is removed

    
function [rs, eigvals, eigvecs] = pca(s, mode, maxpercent)

%tstoolbox/@signal/pca
%   Syntax:
%     * [rs, eigvals, eigvecs] = pca(s) => mode='normalized' , maxpercent
%       = 95
%     * [rs, eigvals, eigvecs] = pca(s, mode) => maxpercent = 95
%     * [rs, eigvals, eigvecs] = pca(s, mode, maxpercent)
%
%   Input arguments:
%     * each row of data is one 'observation', e.g. the sample values of
%       all channels in a multichannel measurement at one point in time
%     * mode can be one of the following : 'normalized' (default), 'mean',
%       'raw'
%          + in mode 'normalized' each column of data is centered by
%            removing its mean and then normalized by dividing through its
%            standard deviation before the covariance matrix is calculated
%          + in mode 'mean' only the mean of every column of data is
%            removed
%          + in mode 'raw' no preprocessing is applied to data
%     * maxpercent gives the limit of the accumulated percentage of the
%       resulting eigenvalues, default is 95 %
%
%   Principal component analysis of column orientated data set.
%
% Copyright 1997-2001 DPI Goettingen, License http://www.physik3.gwdg.de/tstool/gpl.txt

%
%   principal component analysis of column orientated data set <data>
%   
%   input arguments :
%
%   - each row of data is one 'observation', e.g. the sample values of
%     all channels in a multichannel measurement at one point in time
%
%   - mode can be one of the following : 'normalized' (default), 'mean', 'raw'
%     - in mode 'normalized' each column of data is centered by removing its mean
%       and then normalized by dividing through its standard deviation before
%       the covariance matrix is calculated
%     - in mode 'mean' only the mean of every column of data is removed
%     - in mode 'raw' no preprocessing is applied to data
%
%   - maxpercent gives the limit of the accumulated percentage of the resulting
%     eigenvalues, default is 95 %
%
% [rs, eigvals, eigvecs] = pca(s)       => mode='normalized' , maxpercent = 95
% [rs, eigvals, eigvecs] = pca(s, mode)                     => maxpercent = 95   
% [rs, eigvals, eigvecs] = pca(s, mode, maxpercent)
%
% C.Merkwirth,U.Parlitz,W.Lauterborn  DPI Goettingen 1998

narginchk(1,3);

if nargin < 2
	mode = 'normalized';
end