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: Absolute value of each entry in a vector?

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- 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
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

06-17-2014
02:04 PM

06-17-2014
02:04 PM

In MathCAD 14 I am attempting to find the maximum absolute value in a vector that contains positive and negative numbers. With only positve numbers in the vector this works to determine the maximum value:

max(vector)=

With positive and negative values I have tried putting the vector in absolute value bars within the max function like this:

max([vector])=

but the answer is strange and is larger than the aboslute value of any of the entrys in the vector (maybe it's finding the determinant?).

How can a command be written to find the maximum of all the absolute values in a vector?

Solved! Go to Solution.

Labels:

1 ACCEPTED SOLUTION

Accepted Solutions

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

06-17-2014
02:24 PM

06-17-2014
02:24 PM

Just vectorise the absolute value calculation. e.g.

Use the f(M) with the arrow over it to vectorise. You can then put the vectorised absolute values into the max() function.

Alan

5 REPLIES 5

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

06-17-2014
02:24 PM

06-17-2014
02:24 PM

Just vectorise the absolute value calculation. e.g.

Use the f(M) with the arrow over it to vectorise. You can then put the vectorised absolute values into the max() function.

Alan

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

06-18-2014
01:54 AM

06-18-2014
01:54 AM

Re: Absolute value of each entry in a vector?

Werner gives a good explanation on implicit and explicit vectorisation in the following thread which may help.

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

05-15-2017
03:21 PM

05-15-2017
03:21 PM

Re: Absolute value of each entry in a vector?

This solution works in Mathcad 14 but not prime. Is there a simple way to create a vector of the absolute values of another vector?

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

05-15-2017
09:11 PM

05-15-2017
09:11 PM

Re: Absolute value of each entry in a vector?

Daniel Sochor написал(а):

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

05-16-2017
12:24 PM

05-16-2017
12:24 PM

Re: Absolute value of each entry in a vector?

Thank you Valery, that was very simple