Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Jan 28, 2022
05:47 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Jan 28, 2022
05:47 AM

Finding the Max Value from Part of a Matrix

Please see the attached file. I need a simple and elegant solution for finding the max value from part of a single column matrix. Thanks

Solved! Go to Solution.

1 ACCEPTED SOLUTION

Accepted Solutions

Jan 28, 2022
12:48 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Jan 28, 2022
12:48 PM

Here are some variants on the answers already given plus an additional one that allows you to choose whichever elements you want from A.

Note that the functions were written in Mathcad Prime Express 7. Express does not have programming and so breaks a function down into a sequence of successive (functional) steps.

Mathcad Prime Express 7 worksheet attached.

Stuart

9 REPLIES 9

Jan 28, 2022
06:28 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Jan 28, 2022
08:52 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Jan 28, 2022
08:52 AM

Hi,

Martin Hanák

Jan 28, 2022
10:00 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Jan 28, 2022
10:00 AM

Or, in one go, and irrespective of the value of ORIGIN:

Prime4 file attached.

Success!

Luc

Jan 28, 2022
12:38 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Jan 28, 2022
12:48 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Jan 28, 2022
12:48 PM

Here are some variants on the answers already given plus an additional one that allows you to choose whichever elements you want from A.

Note that the functions were written in Mathcad Prime Express 7. Express does not have programming and so breaks a function down into a sequence of successive (functional) steps.

Mathcad Prime Express 7 worksheet attached.

Stuart

Feb 08, 2022
05:28 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Feb 08, 2022
05:28 AM

Hello, I can confirm that **submatrix() **and **programs **are applicable and are the intended approach.

However, getting back to initial request to "simple and elegant solution": Utilizing simple Mathcad definition capabilities, please compare this:

Feb 08, 2022
06:13 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Feb 08, 2022
06:13 AM

See the second line in my response - the shuffle was just there to randomize the data for test purposes (*and provide a function that is potentially useful in other circumstances*).

(the image is just a continuation of the OP's original)

Stuart

Feb 08, 2022
07:24 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Feb 08, 2022
07:24 AM

Well I see. Thank you for the reminder.

Seems that the initial post caused a lot of elegant and other related solutions.

I'd say that this solves the issue anyway.

What you think?

Feb 08, 2022
09:34 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Feb 08, 2022
09:34 AM

@MWunder wrote:

Well I see. Thank you for the reminder.

Seems that the initial post caused a lot of elegant and other related solutions.

I'd say that this solves the issue anyway.

What you think?

On the surface, I agree that it would appear closed.

However, I'm always curious as to what the source of the problem is. For example, why the max of the first 3 of 20 items, and why "matrix" instead of "vector"? Sometimes, there's a bit more to the story that can invalidate the proposed solutions or make them just a subset - eg, the user might want to specify a column of a matrix or realize they need the location of the item as well.

Stuart