Sampling by active element





| Vector | C | ST |
in the palette on the schematic
The block implements the procedure of selecting an element from the second vector according to the active element of the control vector (the first vector) according to the following algorithm:

where u1 = [u1,1, u1,2, …, u1,n] is the control input vector signal; u2 = [u2,1, u2,2, …, u2,n] is the input vector signal of the selected values; n≥1 is the dimension of the input signals, y(t) is the output scalar signal.

Inputs

  • vector_0 - control input vector;
  • vector_1 - a vector of the sampled values.

Outputs

  • output - scalar output signal.

Properties

none

Parameters

none

Note:
the block forms a scalar output signal, that is, only one of the elements of the second input signal is always transmitted to the output (or 0 if all the elements of the control vector are zero).