Can function blocks (Control→Functions & Tables) return vectors? If I use this syntax:
[u[2]; u[1]]
I get an error:
Error evaluating parameter 'Expression' in component model/Fcn: While parsing: syntax error, unexpected '[' before '['.
Can function blocks (Control→Functions & Tables) return vectors? If I use this syntax:
[u[2]; u[1]]
I get an error:
Error evaluating parameter 'Expression' in component model/Fcn: While parsing: syntax error, unexpected '[' before '['.
From the block’s help: “The input may be a scalar or vectorized continuous signal, the output is always a scalar continuous signal.” If your arithmetic is more complicated then above, then perhaps two Function blocks and a Multiplexer would achieve your desired goal.