TrajectoryToLines.emam 479 Bytes
Newer Older
1
2
package ba.util;

Alexander David Hellwig's avatar
Alexander David Hellwig committed
3
4
component TrajectoryToLines<N1 m = 10, N1 m1 = 9>{
    ports in Q^{3,m} trajectoryIn,
5
          //m-1 lineOuts
Alexander David Hellwig's avatar
Alexander David Hellwig committed
6
          out Q^{4,1} lineOut[m1];
7
8

    implementation Math{
Alexander David Hellwig's avatar
Alexander David Hellwig committed
9
        for i = 1:m1
Alexander David Hellwig's avatar
Alexander David Hellwig committed
10
            Q^{4} tmpLine;
11
12
13
14
15
16
17
18
            tmpLine(1,1) = trajectoryIn(1,i);
            tmpLine(2,1) = trajectoryIn(2,i);
            tmpLine(3,1) = trajectoryIn(1,i+1);
            tmpLine(4,1) = trajectoryIn(2,i+1);
            lineOut(i) = tmpLine;
        end
    }
}