summaryrefslogtreecommitdiff
path: root/modules/optimization/demos/icse/icot.sci
blob: 9e70b3fc3eccbd274e324b3e14eaeebda271ac1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
//
// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
// Copyright (C) ????-2008 - INRIA
// Copyright (C) 2010 - DIGITEO - Yann COLLETTE
//
// This file is distributed under the same license as the Scilab package.
//

function [ytot]=icot(dtv)
    // <ytot>=icot(dtv)
    // extraction of the total state
    // input variables :
    // dtv(ndtv) : double precision workarea obtained by the use of
    //             icse,icsu,icsua or icsuq
    // output variables:
    // ytot(ny,nt) : state of the system

    ytot(ny,nti+ntf) = 0.d0;
    lot  = ndtu + ny + ntob + nob*ny + nex*ntob*nob + ...
    2*nu + ntob*nob + ny*(1+ny+nuc+nuv);
    ytot = matrix(dtv(lot+1:lot+ny*(nti+ntf)),ny,nti+ntf)
endfunction