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

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. 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

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 🙂

Werner_E
25-Diamond I
(To:SW_10829970)

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?

Werner_E
25-Diamond I
(To:SW_10829970)


@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

 

Announcements

Top Tags