Select to view content in your preferred language

setElems question

439
1
02-11-2022 12:29 PM
Clover4
Emerging Contributor

Using  version "2021.1".

Trying to use the setElems function but not having success.   I want to use setElems to change the value in an array to a new value.  When I use setElems in a rule it says "undefined rule".  

My array is set up like so:

attr Array1D = [0,0,0,0]

Rule-->
setElems(Array1D,0,5)

Thanks in advance!!

0 Kudos
1 Reply
Hadi_yousefi
Emerging Contributor

hi Brain - this way you can use

attr Array1D = [0,0,0,0]

A =setElems(Array1D,0,5)


Rule-->
print(A)

0 Kudos