%load inputslp
clear all; close all;
load trimforinfill1300
   weight=[];
    X=trimforinfill1300;

                %
                % Options for regem
                %
                OPTIONS.regress = 'mridge';
%                OPTIONS.regress = 'ttls';
%                OPTIONS.regpar = eofnumb(istep)
                OPTIONS.stagtol = 5e-3;
                OPTIONS.maxit = 50;
                OPTIONS.inflation = 1;
                OPTIONS.disp = 1;
                OPTIONS.relvar_res = 0.05;
                OPTIONS.minvarfrac=0.85;

                %OPTIONS.Xcmp = keepers;
                %
%                [X, M, C, Xerr, Xmis, dXmis,peff] = newregem(X, OPTIONS, weight);
                [X, M, C, Xerr, Xmis, dXmis] = newregem(X, OPTIONS, weight);



  
 save('triminfilled1300','X','-ASCII');
