1 страниц (4 вхождений)
Vector & matrix element magnitudes - Absolute or magnitude of elements in a vector - Сообщения
#1 Опубликовано: 18.12.2012 08:16:17
Hi,
I have a vector of tension & compression values signified by positive or negative values.
I am trying to return the maximum absolute value, regardless of tension or compression. In other words, I need to knock all the minus's off every element in the vector, and then return the Max value in the vector.
Is there a function for this (I can't find one), or how do I implement it quite simply?
I have found and installed customfunctions.dll which gives me better Max / Min functions that work on vectors, but this will still not work for me in this case, as it doesn't account for +ve or -ve.
Anyone got a solution?
Thanks.
I have a vector of tension & compression values signified by positive or negative values.
I am trying to return the maximum absolute value, regardless of tension or compression. In other words, I need to knock all the minus's off every element in the vector, and then return the Max value in the vector.
Is there a function for this (I can't find one), or how do I implement it quite simply?
I have found and installed customfunctions.dll which gives me better Max / Min functions that work on vectors, but this will still not work for me in this case, as it doesn't account for +ve or -ve.
Anyone got a solution?
Thanks.
#2 Опубликовано: 18.12.2012 08:48:03
try 'absolute value' with the function 'mat2sys' included in customFunctions-plugin
Look at this post to see if it applies to your problem:
Apply a function over an array or vector
Look at this post to see if it applies to your problem:
Apply a function over an array or vector
#3 Опубликовано: 18.12.2012 09:01:46
Ah, that kind of worked.
Went with: Max(abs(mat2sys(V)))
I'm not familiar with 'systems', so unsure why that works and it doesn't with a matrix as defined. Is that an Smath thing? I don't recall MathCAD doing that.
Went with: Max(abs(mat2sys(V)))
I'm not familiar with 'systems', so unsure why that works and it doesn't with a matrix as defined. Is that an Smath thing? I don't recall MathCAD doing that.
#4 Опубликовано: 18.12.2012 09:19:48
WroteHi,
I have a vector of tension & compression values signified by positive or negative values.
I am trying to return the maximum absolute value, regardless of tension or compression. In other words, I need to knock all the minus's off every element in the vector, and then return the Max value in the vector.
Is there a function for this (I can't find one), or how do I implement it quite simply?
I have found and installed customfunctions.dll which gives me better Max / Min functions that work on vectors, but this will still not work for me in this case, as it doesn't account for +ve or -ve.
Anyone got a solution?
Thanks.
Hi FrugalTPH,
You can find the absolute maximum/minimum value also using the built-in functions (see the attachment).
regards,
w3b5urf3r
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1 пользователям понравился этот пост
Radovan Omorjan 18.12.2012 11:31:00
1 страниц (4 вхождений)
-
Новые сообщения
-
Нет новых сообщений