Ticket #1971: TestTwoOut.mo

File TestTwoOut.mo, 440 bytes (added by Bruno Scaglioni, 12 years ago)
Line 
1model TestTwoOut
2 Real out;
3 Real[3] si;
4 Real[3] so(start={0,0,0},fixed=true);
5
6equation
7 si={1,2,3}*time;
8 when
9 (sample(0,0.1)) then
10 (out, so) = funcTwoOut(si);
11 end when;
12
13end TestTwoOut;
14
15function funcTwoOut
16input Real[3] inp1;
17output Real out1;
18output Real[3] out2;
19algorithm
20out2[1]:=10*inp1[1];
21out2[2]:=10*inp1[2];
22out2[3]:=10*inp1[3];
23
24out1:=-(inp1[1] + inp1[2] + inp1[3]);
25end funcTwoOut;