Vector & matrix element magnitudes

Vector & matrix element magnitudes - Absolute or magnitude of elements in a vector - Сообщения

#1 Опубликовано: 18.12.2012 08:16:17
FrugalTPH

FrugalTPH

0 сообщений из 2 понравились пользователям.

Группа: User

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.
#2 Опубликовано: 18.12.2012 08:48:03
kilele

kilele

133 сообщений из 397 понравились пользователям.

Группа: User

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
#3 Опубликовано: 18.12.2012 09:01:46
FrugalTPH

FrugalTPH

0 сообщений из 2 понравились пользователям.

Группа: User

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.
#4 Опубликовано: 18.12.2012 09:19:48
Davide Carpi

Davide Carpi

1416 сообщений из 2873 понравились пользователям.

Группа: Moderator

Wrote

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.



Hi FrugalTPH,

You can find the absolute maximum/minimum value also using the built-in functions (see the attachment).


regards,

w3b5urf3r
SMath Studio - [Page1].png
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
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений