function [  ] = GenConst( folder, k )
    const=struct;
    
    %Observation
    disp('* Genere Observation --> V');
    [const.('V'), const.('Pi_idx')]=Observation(folder);

    %PCA
    disp('* Optimisiation PCA --> Z');
    const.('Z')=pca_HMM(const.V');
    
    %K-means
    disp('* Reduction K-means --> Clusters');
    opts = statset('Display','final');
    [cluster_idx, const.('C')] = kmeans(const.Z',k,'Distance','sqeuclidean','Replicates',5,'Options',opts);
    
    %Transition
    disp('* Genere Transition --> T');
    const.('T')=Transition(cluster_idx);
    
    %Pi
    disp('* Genere probabilité initiale --> Pi');
    const.('Pi')=Pi(const.Pi_idx, cluster_idx);
    
    %Sigma
    disp('* Genere Variance --> Sigma');
    const.('Sigma')=Sigma( const.Z, cluster_idx );
    
    %sauvegarde
    disp('* Enregistrement des donnees dans la structure');
    save('Constantes.mat', 'const');

end

