Get Help

turn on suggestions

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

Showing results for

- Community
- :
- PTC Mathcad
- :
- PTC Mathcad
- :
- Re: Loops to Find Maximum Value

Options

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

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

Showing results for

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

12-03-2018
06:05 PM

12-03-2018
06:05 PM

Find the maximum value from a list of data and also the value that results in the maximum data.

I have attached a mathcad prime 5 file and pic if you dont have Prime 5

Solved! Go to Solution.

Labels:

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

12-03-2018
07:24 PM

6 REPLIES

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

12-03-2018
06:42 PM

12-03-2018
06:42 PM

Its not clear to me what values you look at to find the maximum.

Are you looking for the maximum of the 11 values which are calculated by

25*sin(j) * 15*sin(j) * ... * 20*sin(j)

as you write about the max value of the "product" (which?).

Or are you looking at the max of the 88 different values calculated by

25*sin(j)

15*sin(j)

...

In both cases it would suffice to look for the max of the eleven sin(j) values and you get the max always for j=1

You may use jmax:=lookup(max(sin(j)), sin(j), j)[0 to find out that jmax=1.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

12-03-2018
06:46 PM

12-03-2018
06:46 PM

Hi

I am after the max of 88 values.

The function may not be sine it could just be an list of numbers

Regards

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

12-03-2018
07:24 PM

Highlighted
##
##### Re: Loops to Find Maximum Value

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

12-03-2018
07:33 PM

12-03-2018
07:33 PM

Here is a different approach using a used defined utility function

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

12-04-2018
05:52 PM

12-04-2018
05:52 PM

Here's a compact implementation that also works in Prime Express:

Prime 4 file is attached.

Success!

Luc

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

12-04-2018
08:10 PM

12-04-2018
08:10 PM

Elegant

Top Tags