No BSD License  

Highlights from
synthesis

from synthesis by Evgeny Veremey
Solves SISO mean-square optimal control design problems: A(p)x = B(p)u + f(t)

X=polsum(A,B)
function X=polsum(A,B)
%X is sum of polynomials A and B.
k1=length(A);
k2=length(B);
if k1>k2
   for s=1:(k1-k2)
      X(s)=A(s);
   end;
   for s=(k1-k2+1):k1
      X(s)=A(s)+B(s-k1+k2);
   end;
end;   
if k1<k2
   for s=1:(k2-k1)
      X(s)=B(s);
   end;
   for s=(k2-k1+1):k2
      X(s)=A(s-k2+k1)+B(s);
   end;
end;   
   if k1==k2
      X=A+B;
   end;   

Contact us at files@mathworks.com