1
function [y,xf]=flts(u,sl,x0)
4
if type(u)<>1 then error(53,1),end
5
if rhs<=1 then error(39),end
8
if type(sl)<>16 then error(97,2),end
12
if rhs==2 then x0=sl(6),end
18
case 'c' then error(94,2),
20
np=maxi(degree(sl(5)))
21
[xf,x]=ltitr(sl(2),sl(3),u(:,1:(mu-np)),x0)
22
if type(sl(5))==1 then
25
y=sl(4)*x+rtitr(sl(5),eye(sl(5)),u)
28
if lhs>1 then error('flts: invalid lhs'),end
29
[num,den]=sl(['num','den']);[ns,ne]=size(num)
31
case 'c' then error(94,2),
33
if ne<>nu then error(60), end;
36
for k=2:ne,[pg,uu]=bezout(pp,den(l,k)),pp=pp*uu(1,2),end
38
for k=1:ne,nnum(l,k)=num(l,k)*pdiv(pp,den(l,k)),end,
40
for l=1:ns, nm(l)=degree(nden(l))-maxi(degree(nnum(l,:))),end
43
[mx,nx]=size(x0);maxdgd=maxi(degree(nden))
45
error('AT LEAST '+string(maxdgd)+' PAST VALUES!')
47
if mx<>ns+ne then error(60),end
52
dnl=maxi(degree(nnum(l,:)))
55
case 2 then yl=rtitr(nnum(l,:),nden(l),u(:,1:lent));
60
up=x0(1:ne,maxdgd-ddl+1:maxdgd);
61
yp=x0(ne+l,maxdgd-ddl+1:maxdgd);
62
y(l,:)=rtitr(nnum(l,:),nden(l),u(:,1:lent),up,yp);