changeset 5814:d0e55a481460 octave-forge

svplot: minor changes in code and documentation
author paramaniac
date Sat, 11 Jul 2009 07:30:31 +0000
parents 44abffae90fa
children eb2fe511a6e5
files main/control/inst/svplot.m
diffstat 1 files changed, 9 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/main/control/inst/svplot.m	Fri Jul 10 15:27:43 2009 +0000
+++ b/main/control/inst/svplot.m	Sat Jul 11 07:30:31 2009 +0000
@@ -17,7 +17,7 @@
 ## @deftypefn{Function File} {[@var{sigma_min}, @var{sigma_max}, @var{w}] =} svplot (@var{sys})
 ## @deftypefnx{Function File} {[@var{sigma_min}, @var{sigma_max}, @var{w}] =} svplot (@var{sys}, @var{w})
 ## If no output arguments are given, the singular value plot of a MIMO
-## system over a range of frequencies is printed on the screen;
+## system is printed on the screen;
 ## otherwise, the singular values of the system data structure are
 ## computed and returned.
 ##
@@ -41,7 +41,7 @@
 ## Vector of frequency values used.
 ## @end table
 ##
-## @seealso{is_digital}
+## @seealso{bode, svd, bode_bounds, is_digital}
 ## @end deftypefn
 
 ## Author: Lukas Reichlin <lukas.reichlin@swissonline.ch>
@@ -102,17 +102,17 @@
     w = logspace (dec_min, dec_max, n_steps); # [rad/s]
   endif
   
-  if (! digital) # continuous system
-    jw = i * w;
-  else # discrete system
-    jw = exp (i*w*tsam);
+  if (digital) # discrete system
+    s = exp (i * w * tsam);
+  else # continuous system
+    s = i * w;
   endif
  
-  ## Repeat for every frequency jw
-  for k = 1 : size (jw, 2)
+  ## Repeat for every frequency s
+  for k = 1 : size (s, 2)
 
     ## Frequency Response Matrix
-    P = C * inv (jw(k)*I - A) * B  +  D;
+    P = C * inv (s(k)*I - A) * B  +  D;
 
     ## Singular Value Decomposition
     sigma = svd (P);