<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Le 24/04/2015 14:34, Stéphane Mottelet
a écrit :<br>
</div>
<blockquote cite="mid:553A3866.3080809@utc.fr" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<div class="moz-cite-prefix">Hello,<br>
<br>
this is not trivial indexing, in fact some terms are linear
combination of v's components <br>
<br>
M1_v=[v(17)<br>
v(104)<br>
v(149)<br>
-(v(18)+v(63)+v(103))<br>
-(v(18)+v(63)+v(103))<br>
v(17)<br>
...<br>
v(104)<br>
v(149)<br>
]<br>
<br>
How do you take this into account in your proposed method ?
These combinations are sums of influxes in a metabolic network,
and the code is automatically generated.<br>
</div>
</blockquote>
In this way: from<br>
1> M1_v=[v(17)<br>
2> v(104)<br>
3> v(149)<br>
4> -(v(18)+v(63)+v(103))<br>
5> -(v(18)+v(63)+v(103))<br>
6> v(17)<br>
...<br>
838> v(104)<br>
839> v(149)<br>
]<br>
<br>
set:<br>
i = [1 2 3 6 ... 838 839]<br>
iv = [17 104 149 17 ... 104 149]<br>
M1_v(i) = v(iv)<br>
im = [4 5 ] // or setdiff(1:839, i).<br>
ivm = [18 18 ... ]<br>
M1_v(im) = -v(ivm)<br>
<br>
// + loop over the rank of elements in the linear combination<br>
// + adapt according to the automatic generation of your code<br>
<br>
Samuel<br>
<br>
</body>
</html>