# Function blocks returning a vector

**URL:** <https://forum.plexim.com/t/function-blocks-returning-a-vector/926>\
**Category:** PLECS\
**Tags:** function\
**Created:** [December 16, 2020, 5:24am UTC](https://forum.plexim.com/t/function-blocks-returning-a-vector/926 "2020-12-16T05:24:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![owiecc](https://dub1.discourse-cdn.com/flex006/user_avatar/forum.plexim.com/owiecc/32/1177_2.png) [@owiecc](https://forum.plexim.com/u/owiecc)\
**Post date:** [December 16, 2020, 5:24am UTC](https://forum.plexim.com/t/function-blocks-returning-a-vector/926/1 "2020-12-16T05:24:26Z")

</div>

Can function blocks (Control→Functions & Tables) return vectors? If I use this syntax:

```auto
[u[2]; u[1]] 

```

I get an error:

```auto
Error evaluating parameter 'Expression' in component model/Fcn: While parsing: syntax error, unexpected '[' before '['.

```

---

<div class="post-metadata">

**Author:** ![Bryan\_Lieblick](https://dub1.discourse-cdn.com/flex006/user_avatar/forum.plexim.com/bryan_lieblick/32/10_2.png) [@Bryan\_Lieblick](https://forum.plexim.com/u/Bryan_Lieblick)\
**Post date:** [December 16, 2020, 10:01am UTC](https://forum.plexim.com/t/function-blocks-returning-a-vector/926/2 "2020-12-16T10:01:32Z")

</div>

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.
