octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #34266] Four issues with "residue" and residue


From: Bernard Grung
Subject: [Octave-bug-tracker] [bug #34266] Four issues with "residue" and residuez"
Date: Sun, 11 Sep 2011 01:44:22 +0000
User-agent: Mozilla/5.0 (X11; Linux i686; rv:6.0) Gecko/20100101 Firefox/6.0

Follow-up Comment #3, bug #34266 (project octave):



Add the following test code to the end of your local copy of "residuez" in
your environment and run "test residuez".

There are copies of "residue" and "residuez" in "coar39" but none of these
copies are used in my environment except for comparisons.

%!test
%! z1=+7.0372976777e+06;
%! p1=-3.1415926536e+09;
%! p2=-4.9964813512e+08;
%! r1=-(1+z1/p1)/(1-p1/p2)/p2/p1  ;
%! r2=-(1+z1/p2)/(1-p2/p1)/p2/p1  ;
%! r3=(1+(p2+p1)/p2/p1*z1)/p2/p1  ;
%! r4=z1/p2/p1                    ; 
%! fi= 1.05e+08     ;
%! T =1/fi          ;
%! p1=exp(p1*T);
%! p2=exp(p2*T);
%! p3=1;
%! p4=1;
%! p =[p1;p2;p3;p4];
%! r4=r4*T;
%! r3=r3-r4;
%! r =[r1;r2;r3;r4];
%! m=[       1     ,     1     ,     1         ,     1         ;
%!        -(2+p2)  ,  -(2+p1)  , -(1+p1+p2)    ,  -(p1+p2)     ;
%!       +(1+2*p2) , +(1+2*p1) , (p1*p2+p1+p2) ,   +p1*p2      ;
%!          -p2    ,   -p1     , -p1*p2        ,     0         ];
%! a1=1.00;
%! a2=-(2+p1+p2);
%! a3=1+2*(p1+p2)+p1*p2;
%! a4=-(p1+p2+2*p1*p2);
%! a5=p2*p1;
%! a =[a1,a2,a3,a4,a5];
%! b=[m*r]';
%! k=[];
%! e=[1;1;1;2];
%! [rx,px,kx,ex] = bg_residuez(b,a);
%! assert ((abs (rx - r) < 1e-8
%!       && abs (px - p) < 1e-8
%!       && isempty (kx)
%!       && ex == e));





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?34266>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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