SMath bug or user error ???
The (practically) same program sequence is working good when used free (even behind a line) but when it is organised as a function it is no more accepted by SMath, motivating that "Array dimensions do not match" ?
The two situations can be obtained (in the appened file) by disableing each of the blue or the yellow zone at a time.
Thanks,
Ioan