cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Absolute value of each entry in a vector?

SOLVED
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

Re: Absolute value of each entry in a vector?

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

Re: Absolute value of each entry in a vector?

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

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.

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

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?

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

Re: Absolute value of each entry in a vector?

Thank you Valery, that was very simple

Announcements