cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

Conditioned multiplication of numbers in Matrix

IRarch
7-Bedrock

Conditioned multiplication of numbers in Matrix

Hello,

 

I would like to multiply only certain numbers in a matrix. Only numbers lower than a certain variable. 

Lets say I have a 1x5 matrix [23 12 89 44 8] and I want to multiply all numbers less than 30 (in the matrix) by 2. 

New matrix would output the following:

 

[46 24 89 44 16]

 

Can someone point me in the right direction...

 

Thanks!

4 REPLIES 4

As follows:

 

 selectmultiply.PNG

 

 

 

 

 

 

Alan

-MFra-
21-Topaz II
(To:IRarch)

es kann auch klassisch gemacht werden ....

OO.jpg

IRarch
7-Bedrock
(To:-MFra-)

Thank you so much, this worked perfectly...

Werner_E
24-Ruby V
(To:IRarch)

OK, so here's a third variant

b.PNG

and here a further "classic" one turned into a function

b2.PNG

Top Tags