File: proof_of_concepts
Directory: /1_projects/3_outsel/Trofinos_output_selection
Author: Peter Polcz (ppolcz@gmail.com)
Created on 2018. March 07.
P_generate_symvars_v5(2,2);
┌P_generate_symvars_v5 └ 0.61402 [sec]
A_sym = [d1^2+1 d2/(d1^2 + 1) ; d1*d2 / (d2^2 + d1^4 + 1) d1^2*d2]
A_sym = 
warning off
lfr = P_LFR_reduction_v6(P_lfrdata_v6(sym2lfr(A_sym)),x), warning on
[ OK ] The first n elements of sigma_b must be identity permutation (in theory) [ OK ] The upper left (n+k)x(n+k) submatrix of Theta should be full-rank [ OK ] Equation of the permuted model should be the same [ OK ] Equation of the reduced model should be the same
lfr = struct with fields:
x: [2×1 sym] A: [2×2 double] B: [2×15 double] C: [15×2 double] D: [15×15 double] Delta: [15×15 sym] G: [15×2 sym] F: [15×15 sym] Pi: [15×1 sym] Pib: [17×1 sym] Pi0: [41×1 sym] q: [1×1 sym] S: [18×18 double] iS: [18×18 double] Gamma: [0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0] Theta: 'TODO'
lfr.x
ans = 
lfr.A
ans =
1 0 0 0
lfr.B
ans =
1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0
lfr.C
ans =
0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 1 0 0 0 0 1
lfr.Pi
ans = 
lfr
lfr = struct with fields:
x: [2×1 sym] A: [2×2 double] B: [2×15 double] C: [15×2 double] D: [15×15 double] Delta: [15×15 sym] G: [15×2 sym] F: [15×15 sym] Pi: [15×1 sym] Pib: [17×1 sym] Pi0: [41×1 sym] q: [1×1 sym] S: [18×18 double] iS: [18×18 double] Gamma: [0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0] Theta: 'TODO'
P_annihilator_linsolve_v6(lfr.Pib,xd)
┌P_annihilator_linsolve_v6 ┌P_annihilator_linsolve_v6 - core computation └ 0.73122 [sec] ┌P_annihilator_linsolve_v6 - quick check I. - obtained annihilator, prec: 10 │ - maximal difference: 1.576430e-16, row nr. 18 └ 0.40578 [sec] ┌P_annihilator_linsolve_v6 - beautify annihilator + !roundings! └ 0.17482 [sec] ┌P_annihilator_linsolve_v6 - quick check II. - the beautified annihilator, prec: 10 │ - maximal difference: 8.120716e-16, row nr. 3 └ 0.33445 [sec] └ 1.6604 [sec]
ans =