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

« back to all changes in this revision

Viewing changes to demos/random/random.dem

  • 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
 
 
2
// Copyright INRIA
 
3
mode(-1)
 
4
getf('SCI/demos/random/random.sci');
 
5
getf('SCI/demos/random/randomT.sci');
 
6
oldln=lines();lines(0)
 
7
deff('[]=demoex(num)','execstr(demolist(num,2))')
 
8
 
 
9
 
 
10
demolist=[
 
11
'Simulation of a binomial random variable','xbasc();BinomialT();';
 
12
'Simulation of a discrete random variable','xbasc();RndDiscT();';
 
13
'Simulation of a geometric random variable','xbasc();GeomT(1000);';
 
14
'Simulation of a Poisson random variable','xbasc();PoissonT() ;';
 
15
'Simulation of an exponential random variable','xbasc();ExpT();';
 
16
'Simulation of a Weibull random variable','xbasc();WeibullT();';
 
17
'Simulation of an hyper geometric random variable','xbasc();HyperGeomT();';
 
18
'Simulation of an Erlang random variable','xbasc();ErlangT();'];
 
19
 
 
20
while %t then
 
21
  num=x_choose(demolist(:,1),'demo of random variable simulations');
 
22
  if num==0 then 
 
23
     lines(oldln(1))
 
24
     return
 
25
  else
 
26
     demoex(num)
 
27
  end,
 
28
end
 
29