getf SCI/util/testexamples.sci reinit_for_test() %U=mopen('SCI/tests/automatic_tests/imrep2ss_data.ref','rb'); s = poly(0, 's'); H = [1/(s + 0.5);2/(s - 0.4)]; if load_ref('H') then pause,end, //strictly proper np = 20;w = ldiv(H('num'), H('den'), np); rep = [w(1:np)';w(np + 1:2 * np)'];//The impulse response H1 = ss2tf(imrep2ss(rep)); if load_ref('H1') then pause,end, z = poly(0, 'z'); H = (2 * (z^2) - 3.4 * z + 1.5)/(z^2 - 1.6 * z + 0.8); if load_ref('H') then pause,end, //Proper transfer function u = zeros(1, 20);u(1) = 1; rep = rtitr(H('num'), H('den'), u);//Impulse rep. // <=> rep=ldiv(H('num'),H('den'),20) w = z * imrep2ss(rep); if load_ref('w') then pause,end, //Realization with shifted impulse response // i.e strictly proper to proper H2 = ss2tf(w); xdel_run(winsid()); mclose(%U);