~ubuntu-branches/ubuntu/hoary/scilab/hoary

« back to all changes in this revision

Viewing changes to macros/scicos/standard_inputs.sci

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2005-01-09 22:58:21 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050109225821-473xr8vhgugxxx5j
Tags: 3.0-12
changed configure.in to build scilab's own malloc.o, closes: #255869

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
// Copyright INRIA
8
8
xf=60
9
9
yf=40
10
 
graphics=o(2)
11
 
model=o(3)
12
 
orig=graphics(1);sz=graphics(2);orient=graphics(3);
13
 
inp=size(model(2),1);clkinp=size(model(4),1);
 
10
graphics=o.graphics
 
11
model=o.model
 
12
orig=graphics.orig;sz=graphics.sz;orient=graphics.flip;
 
13
inp=size(model.in,1);clkinp=size(model.evtin,1);
14
14
if orient then
15
15
  xo=orig(1)
16
16
  dx=-xf/7
19
19
  dx=yf/7
20
20
end
21
21
 
 
22
typ=[];
22
23
 
 
24
//if o.model.sim=='valve' then pause,end
23
25
if inp==0 then
24
 
  x=[];y=[],typ=[]
25
 
else
 
26
  x=[];y=[];
 
27
else 
26
28
  y=orig(2)+sz(2)-(sz(2)/(inp+1))*(1:inp)
27
29
  x=(xo+dx)*ones(y)
28
 
  typ=ones(x)
 
30
  for k=1:inp
 
31
    if o.graphics.in_implicit==[] then
 
32
      typ=ones(x)
 
33
    else
 
34
      if o.graphics.in_implicit(k)=='E' then
 
35
        typ=[typ ones(x(k))]
 
36
      elseif  o.graphics.in_implicit(k)=='I' then
 
37
        typ=[typ 2*ones(x(k))]
 
38
      end
 
39
    end 
 
40
  end
29
41
end
 
42
 
30
43
if clkinp<>0 then
31
44
  x=[x,orig(1)+(sz(1)/(clkinp+1))*(1:clkinp)]
32
45
  y=[y,(orig(2)+yf/7+sz(2))*ones(1,clkinp)]
33
46
  typ=[typ,-ones(1,clkinp)]
34
47
end
 
48
endfunction
 
49
 
 
50
 
 
51
 
 
52
 
35
53
 
36
54
 
37
55