File: EXPBLK_f.sci

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 (43 lines) | stat: -rw-r--r-- 1,004 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
32
33
34
35
36
37
38
39
40
41
42
43
function [x,y,typ]=EXPBLK_f(job,arg1,arg2)
// Copyright INRIA
x=[];y=[];typ=[];
select job
case 'plot' then
  standard_draw(arg1)
case 'getinputs' then
  [x,y,typ]=standard_inputs(arg1)
case 'getoutputs' then
  [x,y,typ]=standard_outputs(arg1)
case 'getorigin' then
  [x,y]=standard_origin(arg1)
case 'set' then
  x=arg1;
  graphics=arg1(2);label=graphics(4)
  model=arg1(3);
  if size(label,'*')==2 then label=label(2),end
  while %t do
    [ok,a,label]=getvalue('Set a^u  block parameters',..
	'a (>0)',list('vec',1),label)
    if ~ok then break,end
    if or(a<=0) then
      message('a^u : a must be positive')
    else
      graphics(4)=label
      model(8)=a;
      x(2)=graphics;x(3)=model
      break
    end
  end
  x(3)(11)=[] //compatibility
case 'define' then
  in=1
  a=%e
  model=list('expblk',-1,-1,[],[],[],[],%e,[],'c',[],[%t %f],' ',list())
  label=[string(in);'%e']
  gr_i=['xstringb(orig(1),orig(2),''a^u'',sz(1),sz(2),''fill'');']
  x=standard_define([2 2],model,label,gr_i)
end