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

Absolute value of each entry in a vector?

dsochor
10-Marble

Absolute value of each entry in a vector?

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?

ACCEPTED SOLUTION

Accepted Solutions

Just vectorise the absolute value calculation. e.g.

vectorise.PNG

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

Alan

View solution in original post

5 REPLIES 5

Just vectorise the absolute value calculation. e.g.

vectorise.PNG

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

Alan

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

http://communities.ptc.com/message/245740#245740

dsochor
10-Marble
(To:dsochor)

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?

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

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?

Thank you Valery, that was very simple

Announcements

Top Tags