Skip to content

Index

The Index block returns the element at a fixed position of its input array.

y = u[index], counting from 0.

Port Direction Type
0 Input An array, [f64; 3] by default
0 Output The array’s element type

The output takes its type from the array wired in.

Name Type Default Meaning
index integer 0 The element’s position

An index past the end of the array is a compile error that shows the block.

For u = [4.0, 5.0, 6.0] and index = 2, the output is y = 6.0. Three Index blocks at 0, 1 and 2 split a 3-vector into its axes.