% how to use the code 
load demodata
options.k = 3;% default value
Dim=25;       % manually set it according to the image you used 
[Eigenvector] = TLDA_single(tr_dat,options,Dim);
for i = 1 : 38
    A(:,:,i) = tr_dat(:,:,i) * Eigenvector;
end