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

Absolute value of each entry in a vector?

dsochor
5-Regular Member

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?

1 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

MikeArmstrong
5-Regular Member
(To:dsochor)

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
5-Regular Member
(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?

dsochor
5-Regular Member
(To:ValeryOchkov)

Thank you Valery, that was very simple

Top Tags