This commit is contained in:
2023-11-14 17:10:27 +08:00
commit d5a822831c
423 changed files with 5909 additions and 0 deletions

14
FOTF Toolbox/sym2fotf.m Normal file
View File

@ -0,0 +1,14 @@
function G1=sym2fotf(G)
% sym2fotf convert symbolic expression to FOTF matrix
% Copyright (c) Dingyu Xue, Northeastern University, China
% Last modified 18 May, 2022
[n,m]=size(G); G1=fotf(zeros(n,m));
for i=1:n, for j=1:m
[num,den]=numden(G(i,j));
G1(i,j)=fotf(sym2ppoly(den),sym2ppoly(num));
end, end, end
function p1=sym2ppoly(p)
syms s real; [C,T]=coeffs(p); T=log(T)/log(s); T=simplify(subs(T,s,2));
p1=ppoly(double(C),double(T));
end