File: dem1.sce

package info (click to toggle)
scilab 2.4-1
  • links: PTS
  • area: non-free
  • in suites: potato, slink
  • size: 55,196 kB
  • ctags: 38,019
  • sloc: ansic: 231,970; fortran: 148,976; tcl: 7,099; makefile: 4,585; sh: 2,978; csh: 154; cpp: 101; asm: 39; sed: 5
file content (36 lines) | stat: -rw-r--r-- 572 bytes parent folder | download | duplicates (4)
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
mode(-1)
// function definition
// Copyright INRIA
deff('[x]=t1(a,b,n)',[
'z=n+m+n,'
'c(1,1)=z,'
'c(2,1)=z+1,'
'c(1,2)=2,'
'c(2,2)=0,'
'if n==1 then,'
' x=a+b+a,'
'else,'
' x=a+b-a''+b,'
'end,'
'y=a(3,z+1)-x(z,5),'
'x=2*x*x*2.21,'
'sel=1:5,'
't=a*b,'
'for k=1:n,'
' z1=z*a(k+1,k)+3,'
'end,'
't(sel,5)=a(2:4,7),'
'x=[a b;-b'' a'']'],'n')

// define type and dimension of the input args
lt1=list();
lt1(1)=list('1','m','m');
lt1(2)=list('1','m','m');
lt1(3)=list('0','1','1');

// show the initial data
printspecs(t1,lt1)

//translate
txt=sci2for(t1,'t1',lt1);
message(txt)