File: %25rc2for.sci

package info (click to toggle)
scilab 2.6-4
  • links: PTS
  • area: non-free
  • in suites: woody
  • size: 54,632 kB
  • ctags: 40,267
  • sloc: ansic: 267,851; fortran: 166,549; sh: 10,005; makefile: 4,119; tcl: 1,070; cpp: 233; csh: 143; asm: 135; perl: 130; java: 39
file content (31 lines) | stat: -rw-r--r-- 612 bytes parent folder | download | duplicates (2)
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
function [stk,nwrk,txt]=%rc2for(nwrk)
// genere le code relatif a la concatenation en ligne des matrices
//!

// Copyright INRIA
rhs=abs(evstr(op(3)))
nl='0';typ=0
for k=1:rhs
 sk=stk(top-rhs+k)
 typ=maxi(typ,evstr(sk(3)))
 nl=addf(nl,sk(4))
end
nc=sk(5)

typ=string(typ)
 
[out,nwrk,txt]=outname(nwrk,typ,nl,nc)
lout=length(out)
nl1='0'
for k=1:rhs
  sk=stk(top-rhs+k)
  if part(out,lout)==')' then
    o1=part(out,1:lout-1)+'+'+mulf(nl1,nc)+')'
  else
    o1=out+'('+addf(nl1,'1')+',1)'
  end
  n1=sk(4)
  txt=[txt;gencall(['dmcopy',sk(1),n1,o1,nl,n1,nc])];
  nl1=addf(nl1,n1)
end
stk=list(out,'-1',typ,nl,nc)