changeset 9626:c4728d463424 octave-forge

updated documentation
author mmarzolla
date Sat, 10 Mar 2012 20:51:31 +0000
parents c2e1990614a2
children 8e744625e429
files main/queueing/doc/queueing.html main/queueing/doc/queueing.pdf
diffstat 2 files changed, 15 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/main/queueing/doc/queueing.html	Sat Mar 10 20:27:25 2012 +0000
+++ b/main/queueing/doc/queueing.html	Sat Mar 10 20:51:31 2012 +0000
@@ -1154,13 +1154,16 @@
       death = zeros(1,N-1);
       Q = diag(birth,1)+diag(death,-1);
       Q -= diag(sum(Q,2));
-      tt = linspace(0,10,100);
+      t = linspace(0,10,100);
       p0 = zeros(1,N); p0(1)=1;
-      L = ctmc_exps(Q,tt,p0);
-      plot( tt, L(:,1), ";State 1;", "linewidth", 2, \
-            tt, L(:,2), ";State 2;", "linewidth", 2, \
-            tt, L(:,3), ";State 3;", "linewidth", 2, \
-            tt, L(:,4), ";State 4 (absorbing);", "linewidth", 2);
+      L = zeros(length(t),N);
+      for i=1:length(t)
+        L(i,:) = ctmc_exps(Q,t(i),p0);
+      endfor
+      plot( t, L(:,1), ";State 1;", "linewidth", 2, \
+            t, L(:,2), ";State 2;", "linewidth", 2, \
+            t, L(:,3), ";State 3;", "linewidth", 2, \
+            t, L(:,4), ";State 4;", "linewidth", 2 );
       legend("location","northwest");
       xlabel("Time");
       ylabel("Expected sojourn time");</pre>
@@ -1222,9 +1225,12 @@
       death = zeros(1,N-1);
       Q = diag(birth,1)+diag(death,-1);
       Q -= diag(sum(Q,2));
-      t = linspace(1e-3,50,500);
+      t = linspace(1e-5,30,100);
       p = zeros(1,N); p(1)=1;
-      M = ctmc_taexps(Q,t,p);
+      M = zeros(length(t),N);
+      for i=1:length(t)
+        M(i,:) = ctmc_taexps(Q,t(i),p);
+      endfor
       plot(t, M(:,1), ";State 1;", "linewidth", 2, \
            t, M(:,2), ";State 2;", "linewidth", 2, \
            t, M(:,3), ";State 3;", "linewidth", 2, \
@@ -1316,7 +1322,7 @@
       death = [ 3 4 5 ] * mu;
       Q = diag(death,-1);
       Q -= diag(sum(Q,2));
-      t = ctmc_mtta(Q,[0 0 0 1])</pre>    &rArr; t = 78.333
+      [t L] = ctmc_mtta(Q,[0 0 0 1])</pre>    &rArr; t = 78.333
 </pre>
    <p class="noindent"><strong>REFERENCES</strong>
 
Binary file main/queueing/doc/queueing.pdf has changed