Overview
Comment: | Added indices - true if corresponding sens fun to be generated. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | origin/master | trunk |
Files: | files | file ages | folders |
SHA3-256: |
cd2aed8b41a3588ee076f98f7bf7225f |
User & Date: | gawthrop@users.sourceforge.net on 1999-09-18 04:20:44 |
Other Links: | branch diff | manifest | tags |
Context
1999-09-18
| ||
04:23:16 | Initial revision check-in: 2062340c6f user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
04:20:44 | Added indices - true if corresponding sens fun to be generated. check-in: cd2aed8b41 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
1999-09-17
| ||
09:19:35 | Added in_2 check-in: 348e9df598 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
Changes
Modified mttroot/mtt/bin/trans/m/mtt_stime.m from [5b7c3603ee] to [49ae0c3d81].
|
| | | > > > > > > > > > > | > | | | | | | | | | | | | | > | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | function [t,y,y_theta] = mtt_stime(system_name,theta,indices); ## usage: [t,y,y_theta] = mtt_stime(system_name,theta); ## ## Simulate system with name system_name and parameter vector theta ## The order of components in theta is determined in system_numpar.txt: ## y_theta contains the corresponding sensitivity functions ## Assumes system generated by the sBG approach ## Copyright (C) 1999 by Peter J. Gawthrop ## $Id$ ## Simulate using mtt-generated function if nargin<3 indices = ones(size(theta)) endif N = length(theta); if N!=length(indices) error(sprintf("The length (%i) of indices must be the same as that of theta (%i)",length(indices),N)); endif y_theta = []; for i=1:length(theta) if indices(i) args=""; for j=1:length(theta) i_sensitivity=(j==i); args = sprintf("%s%i %g ",args, i_sensitivity, theta(j)); endfor args command = sprintf("./%s_ode2odes.out %s > mtt_data.dat\n", system_name, args); system(command); ## Retrieve data load -force mtt_data.dat t = mtt_data(:,1); y = mtt_data(:,2); y_theta = [y_theta mtt_data(:,3)]; endif endfor endfunction |