diff src/ltpda_ssmsim/do_a_run_mat.m @ 0:f0afece42f48

Import.
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 23 Nov 2011 19:22:13 +0100
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/ltpda_ssmsim/do_a_run_mat.m	Wed Nov 23 19:22:13 2011 +0100
@@ -0,0 +1,19 @@
+function [t,y,x] = do_a_run_mat(Nruns, Nsamples, Nstates, Nstatesout, Ninputs, Noutputs)
+  
+  lastX     = zeros(Nstates,1);
+  A         = 0.1*rand(Nstates);
+  Coutputs  = rand(Noutputs,Nstates);
+  Cstates   = eye(Nstates);
+  Cstates   = Cstates(1:Nstatesout,1:Nstates);
+  Baos      = rand(Nstates,Ninputs);
+  Daos      = rand(Noutputs, Ninputs);
+  input     = randn(Ninputs, Nsamples);
+  
+  
+  tic
+  for rr=1:Nruns
+    [y,x,lx] = mat_ssmsim(lastX, A, Coutputs, Cstates, Baos, Daos, input);
+  end
+  mxtime = toc;
+  t = mxtime/Nruns;
+end