truncate

Parameters

Parameter label

I/O type

Data type

Mandatory parameter?

Default value

inputVec

input

vector

yes

N/A

mode

input

string ("front"/"back")

no

"front"

value

input

scalar

yes

N/A

outputVec

output

scalar

N/A

N/A

Functionality

Module truncates value elements from the front (mode="front") or back (mode="back") of inputVec.

Here are two simple examples:

inputVec = [26,1,-1,-23]
mode = "front"
value = 0
...
outputVec = [26,1,-1,-23]
inputVec = [26,1,-1,-23]
mode = "front"
value = 2
...
outputVec = [-1,-23]
inputVec = [26,1,-1,-23]
mode = "back"
value = 2
...
outputVec = [26,1]