Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
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.
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
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
Werner gives a good explanation on implicit and explicit vectorisation in the following thread which may help.
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