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

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Conditioned multiplication of numbers in Matrix

IRarch
8-Gravel

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
8-Gravel
(To:-MFra-)

Thank you so much, this worked perfectly...

Werner_E
25-Diamond I
(To:IRarch)

OK, so here's a third variant

b.PNG

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

b2.PNG

Announcements

Top Tags