Rename variable because dst is now a Scilab function. 78/9278/1
Vincent COUVERT [Wed, 26 Sep 2012 07:41:51 +0000 (09:41 +0200)]
To test: test_run("cacsd", ["bug_6883" "bug_7566"]);

Change-Id: Id03fd907278d594028efaf3e9ceb7012043131a5

scilab/modules/cacsd/macros/black.sci

index c266779..cd240cd 100644 (file)
@@ -34,7 +34,7 @@ function black(varargin)
 
 //To plot the grid of iso-gain and iso-phase of y/(1+y) use abaque()
 //%Example
-//  s=poly(0,'s")
+//  s=poly(0,"s")
 //  h=syslin("c",(s**2+2*0.9*10*s+100)/(s**2+2*0.3*10.1*s+102.01))
 //  nicholschart();
 //  black(h,0.01,100,"(s**2+2*0.9*10*s+100)/(s**2+2*0.3*10.1*s+102.01)")
@@ -124,18 +124,18 @@ function black(varargin)
   kf=1
   phi1=phi+5*ones(phi);
 
-  kk=1;p0=[phi(:,kk) d(:,kk)];ks=1;dst=0;
+  kk=1;p0=[phi(:,kk) d(:,kk)];ks=1;Dst=0;
   dx=max(%eps,xmx-xmn);
   dy=max(%eps,ymx-ymn);
   dx2=dx^2;dy2=dy^2
 
   while kk<n
     kk=kk+1
-    dst=dst+min(sqrt(((phi(:,kk-1)-phi(:,kk))^2)/dx2+((d(:,kk-1)-d(:,kk))^2)/dy2))
-    if dst>0.2 then
+    Dst=Dst+min(sqrt(((phi(:,kk-1)-phi(:,kk))^2)/dx2+((d(:,kk-1)-d(:,kk))^2)/dy2))
+    if Dst>0.2 then
       if min(abs(frq(:,ks(prod(size(ks))))-frq(:,kk))./frq(:,kk))>0.2 then
         ks=[ks kk]
-        dst=0
+        Dst=0
       end
     end
   end