% sript for testing structure estimating function % run just time-to-time - do not forget to copy resulting values to % test_arx_straux.cpp!!! if 1 S={}; i=1; for dim=[3 5 10 20] A=rand(dim); B=rand(dim); S{i}.A = A; S{i}.B = B; i=i+1; end % when run, copy output to the else section else S = load('str_aux'); end for i=1:length(S) [L0,D0]=ldform(S{i}.A, eye(size(S{i}.A,1))); [L1,D1]=ldform(S{i}.A+S{i}.B, eye(size(S{i}.A,1))); % structure estimation - copied form facstr belief = 2; % default belief nbest = 1; % nbest: how many regressors are returned nrep = 5; % nrep: number of random repetions of structure estimation lambda = 0.9; k=2; % [strout, rgrsout, statistics] = % straux1(L, d, nu, L0, d0, nu0, belief, nbest, max_nrep, lambda, % order_k); [o1,o2,o3]=straux1(L1,diag(D1),20, L0, diag(D0), 10, belief, nbest, nrep, lambda, k); S{i}.o1= o1; end save str_aux S