~ubuntu-branches/ubuntu/karmic/scilab/karmic

« back to all changes in this revision

Viewing changes to macros/scicos_blocks/MFCLCK_f.sci

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2002-03-21 16:57:43 UTC
  • Revision ID: james.westby@ubuntu.com-20020321165743-e9mv12c1tb1plztg
Tags: upstream-2.6
ImportĀ upstreamĀ versionĀ 2.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
function [x,y,typ]=MFCLCK_f(job,arg1,arg2)
 
2
// Copyright INRIA
 
3
x=[];y=[];typ=[];
 
4
select job
 
5
case 'plot' then
 
6
  standard_draw(arg1)
 
7
case 'getinputs' then
 
8
  [x,y,typ]=standard_inputs(arg1)
 
9
case 'getoutputs' then
 
10
  [x,y,typ]=standard_outputs(arg1)
 
11
case 'getorigin' then
 
12
  [x,y]=standard_origin(arg1)
 
13
case 'set' then
 
14
  x=arg1;
 
15
  graphics=arg1(2);label=graphics(4)
 
16
  model=arg1(3);
 
17
  [ok,dt,nn,label]=getvalue('Set Multifrequency clock parameters',..
 
18
      ['basic period (1/f)';'multiply by (n)'],list('vec',1,'vec',1),label)
 
19
  if ok then
 
20
    model(9)=nn
 
21
    model(8)=dt;
 
22
    hh=model(11);hh(2)=0;model(11)=hh //compatibility
 
23
    graphics(4)=label
 
24
    x(2)=graphics;x(3)=model
 
25
  end
 
26
case 'define' then
 
27
  nn=2
 
28
  dt=0.1
 
29
  model=list('mfclck',[],[],1,[1;1],[],0,dt,nn,'d',[-1 0],[%f %f],' ',list())
 
30
  label=[string(dt);string(nn)]
 
31
  gr_i=['txt=[''M. freq'';''clock''];';
 
32
    'xstringb(orig(1),orig(2),txt,sz(1),sz(2),''fill'')']
 
33
  x=standard_define([2 2],model,label,gr_i)
 
34
end
 
35
 
 
36
 
 
37
 
 
38