help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Not able to get the matlab equivalent output from tfestimate functio


From: Mike Miller
Subject: Re: Not able to get the matlab equivalent output from tfestimate function (transfer function estimate)
Date: Fri, 15 Feb 2013 08:18:45 -0500

On Fri, Feb 15, 2013 at 1:19 AM, sarbjit wrote:
> Sorry to bother you again, but below is my observation :
>
> If I used the position of arguments of tfestimate as suggested, the size of
> the matrixes are same as Matlab, but their values are different.

If you want bit-exact identical answers, I can't help you. If you are
asking whether they are the same, for some acceptable level of
"sameness", then I claim that they are and there's no problem here.
This is my complete session, which is enough to convince me that these
are equivalent results:

octave:1> pkg load signal
octave:2> load matlab.mat
octave:3> oct_tf = tfestimate (x, y, [], [], 10);
octave:4> ideal_tf = ones (size (txy));
octave:5> max (abs (txy - oct_tf))
ans =  5.4953e-09
octave:6> max (abs (txy - ideal_tf))
ans =  5.4628e-09
octave:7> max (abs (oct_tf - ideal_tf))
ans =  5.5581e-09

And if you really need a picture:

subplot (2, 1, 1)
plot (W, 20*log10 (abs (txy)))
axis ([0, pi, -10, 10])
title ("Matlab tfestimate")
subplot (2, 1, 2)
plot (W, 20*log10 (abs (oct_tf)))
axis ([0, pi, -10, 10])
title ("Octave tfestimate")

-- 
mike


reply via email to

[Prev in Thread] Current Thread [Next in Thread]