PDA

View Full Version : multiplication on link position matrix


Chapre
07-07-2011, 03:38 AM
Hello;
I want to create an operator on a link (position) that should always half the first value of the input matrix (list) and leave the rest intact.

EX: imput matrix=[ a,b ,c ] * operator ------> output matrix=[ a/2 , b ,c ]

Jeff
07-07-2011, 10:21 AM
The <link>.preScale command will pre multiply the input matrix with the specified scale:
link.preScale([0.5,1,1],target=viz.LINK_POS_OP)

Chapre
07-08-2011, 01:55 AM
Thank Jeff, that's exactly what I needed