Rank: 223721 based on 0 downloads (last 30 days) and 0 file submitted
photo

Seis Erres

E-mail

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Comments and Ratings by Seis View all
Updated File Comments Rating
23 Sep 2009 Padefit Rational polynomial fitting Author: Paul Godfrey

Thank you very much for this nice function which works perfectly

24 Jul 2009 Pade Approximation Computes the reduced order model for a given system by matching time moments Author: Janardhanan Sivaramakrishnan

Nice function especially useful for reducing systems coming from matlab linearizations.

There is a little mistake in the code easily catch by M-lint

wrong

if ~isreal(r) || (fix(r)~=r) || (r<1) || (r>n) %%% here n is undefined
error('Invalid value of reduced model order')
end
[num,den]=tfdata(G,'v');
D_fact=num(1)/den(1);
num=num-D_fact*den;
num1=num(end:-1:1)/den(1);
den1=den(end:-1:1)/den(1);
n=length(den1)-1;

right

[num,den]=tfdata(G,'v');
D_fact=num(1)/den(1);
num=num-D_fact*den;
num1=num(end:-1:1)/den(1);
den1=den(end:-1:1)/den(1);
n=length(den1)-1;

if ~isreal(r) || (fix(r)~=r) || (r<1) || (r>n)
error('Invalid value of reduced model order')
end

I would like to know if the author agree with this correction.

Apart from this correction the function works nicely. I find it very useful and I thank the author for sharing it.

Regards.

Contact us