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

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

Min/Max at each index between 2 matricies

SW_10829970
1-Newbie

Min/Max at each index between 2 matricies

I am trying to find the min/max value at each index across 2 matricies.

The min/max function finds the smallest/largest value across both matricies at every index, which is not what i want.. PNG and mathcadfile attached for clarity. I am using mathcad prime 9.0.0.0. I have tried several syntaxes (shown in the attachment), but to no luck.

 

Does anyone know the syntax for this?

 

Cheers,

Sebastian

1 ACCEPTED SOLUTION

Accepted Solutions
ttokoro
20-Turquoise
(To:SW_10829970)

5 REPLIES 5
ttokoro
20-Turquoise
(To:SW_10829970)

image.pngimage.pngimage.png

Thank you for your swift reply! It seemed that calling out i was the issue 🙂

The built-in function "min" and "max" can't be vectorized, but you can define your own Min/Max functions based on the built-in ones and call these vectorized:

Werner_E_0-1704977422920.png

 

Is there an easy function or setting to make the answer come out as a 5x1 matrix, rather than a 1x5?


@SW_10829970 wrote:

Is there an easy function or setting to make the answer come out as a 5x1 matrix, rather than a 1x5?


The answer actually IS a 5 x 1 matrix (5 rows, 1 column).

If you would rather like to see it as a row vector (1 x 5 matrix), simply use the Transpose operator.

Werner_E_0-1705009489994.png

 

Top Tags