File: sci_contour.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 (40 lines) | stat: -rw-r--r-- 970 bytes parent folder | download
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
function [stk,txt,top]=sci_contour()
// Copyright INRIA
txt=[]
if stk(top)(5)=='10' then
  set_infos('contour '+stk(top)(1)+' option not yet handled',1)
  top=top-1
  rhs=rhs-1
end
if lhs==2 then
  set_infos('contour with lhs args not yet handled',2)
end
select rhs
case 1 then //contour(Z)
  x='1:size('+stk(top)(1)+',1)'
  y='1:size('+stk(top)(1)+',2)'
  z=stk(top)(1)
  stk=list('contour2d'+rhsargs([x,y,z]),'0','?','?','?')
case 2 then
  x='1:size('+stk(top-1)(1)+',1)'
  y='1:size('+stk(top-1)(1)+',2)'
  z=stk(top-1)(1)
  nz=stk(top)(1)
  stk=list('contour2d'+rhsargs([x,y,z,nz]),'0','?','?','?')
case 3 then  
  x=stk(top-2)(1)
  y=stk(top-1)(1)
  z=stk(top)(1)
  stk=list('contour2d'+rhsargs([x,y,z]),'0','?','?','?')
case 4 then
  x=stk(top-3)(1)
  y=stk(top-2)(1)
  z=stk(top-1)(1)
  stk=list('contour2d'+rhsargs([x,y,z]),'0','?','?','?')
  nz=stk(top)(1)
  stk=list('contour2d'+rhsargs([x,y,z,nz]),'0','?','?','?')
end
if lhs==2 then
  stk=list(stk,stk)
end