function[plt] = ficCR(Y,Z,clas,moyX,CV,R,valProp,vectProp,info,nObs,nVar,lblVar,lblObs,lblValProp,lblInfo,lst,methode,YC,ZC,YR,ZR);

    ttr = ' Obs.  ';
    for i = 1:nVar
        ttr = ttr+lblVar(i)+'  ';
    end;

    plt = 1;
    nVr = nVar;
    if (methode == 3) then nVr = nVar - 1; end;
    if (methode == 4) then nVr = nCl - 1; end;
    limLig = 10;
    if (limLig > nVr) then limLig = nVr;  end;

//  Affichage des resultats

    fprintf(%io(2),'%s',titre); 
    fprintf(%io(2),'===============================================================');
    fprintf(%io(2),'  ');
    select methode,
        case 2 then
               fprintf(%io(2),'ANALYSE EN COMPOSANTES PRINCIPALES');
        case 3 then
               fprintf(%io(2),'ANALYSE FACTORIELLE DES CORRESPONDANCES');
        case 4 then
               fprintf(%io(2),'ANALYSE FACTORIELLE DISCRIMINANTE');
        else
        disp('Methode non implementee pour l''instant');
    end;
    fprintf(%io(2),'  ');
    fprintf(%io(2),'Nombre d''observations utilisees  %4.0f\n', nObs);
    fprintf(%io(2),'Nombre de variables utilisees    %4.0f\n', nVar);
    for i = 1:nVar
        fprintf(%io(2),'%4.0fe variable           %s\n', i, lblVar(i));
    end;
    fprintf(%io(2),'  ');
    fprintf(%io(2),'RESULTATS  ');
    fprintf(%io(2),'  ');
    fprintf(%io(2),'  Axes        Val. propres    Information en pc');
    fprintf(%io(2),'  ');
    for i = 1:nVr
        lblV = 'axe no '+string(i)+'  ';
        fprintf(%io(2),'    %s      %12.4f      %12.4f   ', lblV, valProp(i),info(i));
    end;


//  Ecriture du fichier de compte-rendu

    disp('ECriture du fichier de compte-rendu. Patientez svp.');

    writef(lst,'%s  \n',titre);
    writef(lst,'%s  \n','===============================================================\n');
    writef(lst,'%s\n','  ');
    select methode,
        case 2 then
               writef(lst,'%s  \n','ANALYSE EN COMPOSANTES PRINCIPALES');
        case 3 then
               writef(lst,'%s  \n','ANALYSE FACTORIELLE DES CORRESPONDANCES');
        case 4 then
               writef(lst,'%s  \n','ANALYSE FACTORIELLE DISCRIMINANTE');
        else
        disp('Methode non implementee pour l''instant');
    end;
    writef(lst,'%s  \n','  ');
    writef(lst,'Nombre d''observations utilisees  %4.0f\n', nObs);
    for i = 1:nObs
        writef(lst,'%4.0fe observation        %s\n', i, lblObs(i));
    end;
    writef(lst,'%s  \n','  ');
    writef(lst,'Nombre de variables utilisees    %4.0f\n', nVar);
    for i = 1:nVar
        writef(lst,'%4.0fe variable           %s\n', i, lblVar(i));
    end;
    writef(lst,'%s  \n','  ');
    writef(lst,'%s  \n','RESULTATS  ');
    writef(lst,'%s  \n','  ');
    xv = '   ';
    xvv = '   ';
    xv1 ='   ';
    for i = 1:nVr
        xv = xv+'       Axe '+string(i);
     xvv = xvv +'        '+lblVar(i);
        xv1 = xv1+string(i)+'        ';
    end;
    if (methode == 2) then
        writef(lst,'%s  \n','   ');
//        writef(lst,'%s  \n','Moyennes des variables');
//        writef(lst,'%s  \n','  ');
//        writef(lst,'%s  \n',xv1);
//        ks = 0;
//        for i = 1:nVar
//            writef(lst,'%4.0f  ',moyX(i));
//            if (ks == limLig) then
//                ks = 0
//                writef(lst,'%s  \n','    ');
//                writef(lst,'%s ','    ');
//            end;
//        end;
//        if (ks <> 0) then
//            writef(lst,'%s  \n','    ');
//        end;
        writef(lst,'%s  \n','  ');
        writef(lst,'%s  \n','   ');
        writef(lst,'%s  \n','Matrice des variances - covariances')
        writef(lst,'%s  \n','  ');
        writef(lst,'%s ','    ');
        writef(lst,'%s  \n',xvv);
        writef(lst,'%s ','    ');
        ks = 0
        for i = 1:nVar
            xt(1) = i;
            writef(lst,'%4.0f  ',xt(1));
            for j = 1:nVar-1
                xt(j+1) = CV(i,j);
                writef(lst,'%10.4f  ',xt(j+1));
                ks = ks + 1;
                if (ks == limLig) then
                    ks = 0
                    writef(lst,'%s  \n','    ');
                    writef(lst,'%s ','          ');
                end;
            end;
            xt(nVar+1) = CV(i,nVar);
            writef(lst,'%10.4f  \n',xt(nVar+1));
            writef(lst,'%s ','    ');
            ks = 0;
        end;
        writef(lst,'%s  \n','   ');
        writef(lst,'%s  \n','   ');
        writef(lst,'%s  \n','Matrice des correlations')
        writef(lst,'%s  \n','  ');
        writef(lst,'%s ','             ');
        writef(lst,'%s  \n',xvv);
        writef(lst,'%s ','    ');
        ks = 0;
        for i = 1:nVar
            xt(1) = i;
            writef(lst,'        %4.0f  ',xt(1));
            for j = 1:nVar-1
                xt(j+1) = R(i,j);
                writef(lst,'%10.4f  ',xt(j+1));
                ks = ks + 1;
                if (ks == limLig) then
                    ks = 0
                    writef(lst,'%s  \n','    ');
                    writef(lst,'%s ','                  ');
                end;
            end;
            xt(nVar+1) = R(i,nVar);
            writef(lst,'%10.4f  \n',xt(nVar+1));
            writef(lst,'%s ','    ');
            ks = 0;
        end;
        writef(lst,'%s  \n','   ');
    end;
    writef(lst,'%s  \n','   ');
    writef(lst,'%s  \n','      Axes             Val. propres      Information en pc');
    writef(lst,'%s  \n','  ');
    for i = 1:nVr
        lblV = 'axe no '+string(i)+'  ';
        if (i < 10) then lblV = lblV +' '; end;
        writef(lst,'    %s      %12.4f      %12.4f   \n', lblV, valProp(i),info(i));
    end;
    writef(lst,'%s  \n','  ');
    writef(lst,'%s  \n','   ');
    writef(lst,'%s  \n','Vecteurs propres');
    writef(lst,'%s  \n','   ');
    writef(lst,'%s \n',xv);
    writef(lst,'%s ','    ');
    for i = 1:nVar
        ks = 0;
        for j = 1:nVr
            writef(lst,'%10.4f  ',vectProp(i,j));
            ks = ks + 1;
            if (ks == limLig) then
                ks = 0
                writef(lst,'%s  \n','    ');
                writef(lst,'%s ','    ');
            end;
        end;
        if (ks <> 0) then
            writef(lst,'%s  \n','    ');
            writef(lst,'%s ','    ');
        end;
    end;

    writef(lst,'%s  \n','  ');
    writef(lst,'%s  \n','   ');
    writef(lst,'%s  \n','Tableau des observations reconstituees');
    if (methode > 2 ) then writef(lst,'%s  \n','1e ligne : Coordonnees factorielles '); end;
    if (methode == 2) then writef(lst,'%s  \n','1e ligne : Coordonnees sur les axes principaux '); end;
    writef(lst,'%s  \n','2e ligne : Contributions absolues');
    writef(lst,'%s  \n','3e ligne : Cosinus carre, caracteristique de la qualite de la representation');
    writef(lst,'%s  \n','  ');
    writef(lst,'%s ','    ');
    writef(lst,'%s \n',xv);
    writef(lst,'%s ','  ');
    for i = 1:nObs
         for j = 1:nVr
            xt(j) = Y(i,j);
            select methode,
                case 2 then
                    xtt(j) = Y(i,j)* Y(i,j);
                    xta(j) = xtt(j) /(nObs * valProp(j));
                    xtt(j) = xtt(j) / YC(i);
                case 3 then
                    xta(j) = YC(i,j);
                    xtt(j) = YR(i,j);
            end;
        end;
        xtit = lblObs(i);
        writef(lst,'%s', xtit);
        ks = 0;
        xtit = '  ';
        if (i < 10) then writef(lst,'%s ','  '); end;
        if (i > 9 & i < 100) then writef(lst,'%s ',' '); end;
        if (i > 99 & i < 1000) then writef(lst,'%s ',''); end;
        for j = 1:nVr
            writef(lst,'%10.4f  ', xt(j));
            ks = ks + 1;
            if (ks == limLig) then
                ks = 0;
                writef(lst,'%s \n','  ');
                writef(lst,'%s ', '         ');
            end;
        end;
        if (ks <> 0) then
            writef(lst,'%s \n','  ');
            writef(lst,'%s ','    ');
            writef(lst,'%s ','    ');
        end;
        if (methode < 4) then
            ks = 0;
            xtit = '    ';
            for j = 1:nVr
                writef(lst,'%10.4f  ', xta(j));
                ks = ks + 1;
                if (ks == limLig) then
                    ks = 0;
                    writef(lst,'%s \n','  ');
                    writef(lst,'%s ', xtit);
                    if (j <> nVr) then writef(lst,'%s ','    '); end;
                end;
            end;
            if (ks <> 0) then
                writef(lst,'%s \n','  ');
                writef(lst,'%s ','    ');
            end;
            writef(lst,'%s ','    ');
            ks = 0;
            xtit = '    ';
            for j = 1:nVr
                writef(lst,'%10.4f  ', xtt(j));
                ks = ks + 1;
                if (ks == limLig) then
                    ks = 0;
                    writef(lst,'%s \n','  ');
                    writef(lst,'%s ', xtit);
                    if (j <> nVr) then writef(lst,'%s ','    '); end;
                end;
            end;
            if (ks <> 0) then
                writef(lst,'%s \n','  ');
                writef(lst,'%s ','    ');
            end;
        end;
        writef(lst,'%s \n',' ');
        writef(lst,'%s ','  ');
    end;

    writef(lst,'%s  \n','  ');
    writef(lst,'%s  \n','   ');
    writef(lst,'%s  \n','Tableau des variables reconstituees');
    if (methode == 2) then writef(lst,'%s  \n','1e ligne : Coordonnees sur les axes principaux '); end;
    if (methode == 3) then
        writef(lst,'%s  \n','1e ligne : Coordonnees factorielles ');
        writef(lst,'%s  \n','2e ligne : Contributions absolues (cosinus carre, caracteristique de la qualite de la representation)');
        writef(lst,'%s  \n','3e ligne : Contributions relatives (\`a l inertie expliquee par l axe)');
    end;
    writef(lst,'%s  \n','  ');
    writef(lst,'%s ',' ');
    writef(lst,'%s \n',xv);
//    writef(lst,'%s ',' ');
    for i = 1:nVar
        xtit = lblVar(i);
        writef(lst,'%s   ', xtit);
//        if (i == 1 ) then writef(lst,'%s ','    ');  end;
//        if (i > 1 & methode == 3) then writef(lst,'%s ','    ');  end;
        ks = 0;
        for j = 1:nVr
            ks = ks + 1;
            writef(lst,'%10.4f  ',Z(i,j));
            if (ks == limLig) then
                ks = 0;
                xtit = '    ';
                writef(lst,'%s \n','  ');
                writef(lst,'%s ','             ');
            end;
        end;
//        if (ks > 0) then
            writef(lst,'%s\n',' ');
//                writef(lst,'%s ','    ');
            ks = 0;
//        end;
        if (methode == 3) then
            ks = 0;
          writef(lst,'%s ','      ');
            for j = 1:nVr
                ks = ks + 1;
                writef(lst,'%10.4f  ',ZC(i,j));
                if (ks == limLig) then
                    ks = 0;
                    xtit = '        ';
                    writef(lst,'%s \n','  ');
                    writef(lst,'%s ', '             ');
               end;
            end;
//            if (ks <> 0) then
                writef(lst,'%s \n',' ');
//                writef(lst,'%s ','        ');
                ks = 0;
//            end;
            ks = 0;
            writef(lst,'%s ','      ');
            for j = 1:nVr
                ks = ks + 1;
                writef(lst,'%10.4f  ',ZR(i,j));
                if (ks == limLig) then
                    ks = 0;
                    xtit = '    ';
                    writef(lst,'%s \n','  ');
                    writef(lst,'%s ', '             ');
                 end;
            end;
            if (ks <> 0) then
                writef(lst,'%s \n','  ');
                ks = 0;
            end;
        end;
        writef(lst,'%s \n',' ');
//        writef(lst,'%s ','  ');
    end;
    writef(lst,'%s  \n','   ');
    writef(lst,'%s  \n','   ');

    if (methode == 2) then
        RY = vectProp * diag(sqrt(valProp));
        writef(lst,'%s  \n','   ');
        writef(lst,'%s  \n','Correlations entre les variables et les axes principaux');
        writef(lst,'%s  \n','  ');
        writef(lst,'%s ',' ');
        writef(lst,'%s \n',xv);
        writef(lst,'%s ','  ');
        ks = 0;
        for i = 1:nVar
            xttt = lblVar(i);
            writef(lst,'%s', xttt);
            xt(1) = i;
            for j = 1:nVr
                writef(lst,'%10.4f  ',RY(i,j));
                ks = ks + 1;
                if (ks == limLig) then
                    ks = 0;
                    xtit = '    ';
                    writef(lst,'%s \n','  ');
                    writef(lst,'%s ', '             ');
                end;
            end;
            if (ks <> 0) then 
                writef(lst,'%s \n',' '); 
                writef(lst,'%s ', '    ');
                ks = 0;
            end;
            writef(lst,'%s \n',' ');
            writef(lst,'%s ','  ');
        end;
        writef(lst,'%s  \n','  ');
    end;
  
endfunction      
    

