"Fossies" - the Fresh Open Source Software Archive

Member "sip-0.12.1/macros/sip_pca.sci" (18 Jun 2015, 188 Bytes) of package /linux/privat/sip-0.12.1.tar.gz:

As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Scilab source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 function [data_db, mean_db] = sip_pca(data, n_compress)
    2   mean_db = mean(data,2);
    3   data = data - mean_db*ones(1,size(data,2))
    4   [u,s] = svda(data, n_compress)
    5   data_db = u*s
    6 endfunction