Hi friends, I have this sample program and I want to give EEG input signal for this. Can you please tell me how to give the input and if possible provide me the EEG data also. Because i don't know how to get the data. somewhere I have seen, it is nearly 6-7 GB is there.please help me in this issue. Thank you

function [W, S] = ica(X)

% ICA Perform independent component analysis.

%

% [W, S] = ica(X);

%

% where X = AS and WA = eye(d) and [d,n] = size(X) (d dims, n samples)

% Implements FOBI algorithm.

% JF Cardoso (1989) "Source separation using higher order moments", Proc Intl Conf Acoust Speech Signal Process

[d, n] = size(X);

% Subtract off the mean of each dimension.

X = X - repmat(mean(X,2),1,n);

% Calculate the whitening filter.

[E, D] = eig(cov(X'));

% Whiten the data

X_w = sqrtm(pinv(D))*E'*X;

% Calculate the rotation that aligns with the directions which maximize fourth-order correlations.

% See reference above.

[V,s,u] = svd((repmat(sum(X_w.*X_w,1),d,1).*X_w)*X_w');

% Compute the inverse of A.

W = V * sqrtm(pinv(D)) * E';

% Recover the original sources.

S = W * X;

Similar questions and discussions