summaryrefslogtreecommitdiff
path: root/data_structures/RAND_m.js
blob: 7569ac855b7a05c725dcbc7c54732189a03c4658 (plain)
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
function RAND_m () {


	var a = 0;

	var b = 1;

	var dt = 0;

	var flag = 0;

	var function_name = "rndblk_m";

	var funtyp = 4;

	var model = scicos_model();
	model.sim=list(function_name,funtyp);
	model.in = new ScilabDouble();
	model.in2 = new ScilabDouble();
	model.intyp = new ScilabDouble();
	model.out = new ScilabDouble([1]);
	model.out2 = new ScilabDouble([1]);
	model.outtyp = new ScilabDouble([1]);
	model.evtin = new ScilabDouble([1]);
	model.evtout = new ScilabDouble();
	model.state = new ScilabDouble();
	model.dstate = new ScilabDouble([int(rand()*(10^7-1))],[0*...a]);
	model.rpar = new ScilabDouble([...a,...b]);
	model.ipar=new ScilabDouble([flag]);
	model.blocktype = new ScilabString(["d"]);
	model.firing = new ScilabDouble();
	model.dep_ut = new ScilabBoolean([false,false]);

	var exprs = [[sci2exp(1)],[flag.toString()],[sci2exp([a])],[sci2exp([b])],[sci2exp([model.dstate(1),int(rand()*(10^7-1))])]];

	var gr_i = [];
	this.x=new standard_define(new ScilabDouble([3,2]),model,exprs,gr_i);
}