Elemend ID of max failure Index
Find more posts tagged with
Hi Adriano,
thanks for your quick response. The solution with indexofmax makes it possible to check if the failure occures at the same spot, that helps a lot. Because every Element has several composite layers which could fail it is not easy to determine the element id because I have a matrix of Element_id x Composite_layer and for other reasons it is not possible to have continuisly numbered elements.
if you're reading a vector, you could use indexofmax (or something like this) to retrieve which index gives you the maximum value.
Remember that HyperStudy works based on 0 index, so that the first index is 0, not 1.
So if you have a big vector with FI for each element, let's say "ds_1"
ds_1 = {0.4 0.2 0.0 1.0 0.4}
Your response could be:
r_1 = indexofmax(ds_1)
will give you 3 as response. This is not the element ID, but the index of the i'th element in your list.
If your elements are renumbered starting from 1 and with no gaps, then your index would be equivalent to (ID-1)
if you're reading a vector, you could use indexofmax (or something like this) to retrieve which index gives you the maximum value.
Remember that HyperStudy works based on 0 index, so that the first index is 0, not 1.
So if you have a big vector with FI for each element, let's say "ds_1"
ds_1 = {0.4 0.2 0.0 1.0 0.4}
Your response could be:
r_1 = indexofmax(ds_1)
will give you 3 as response. This is not the element ID, but the index of the i'th element in your list.
If your elements are renumbered starting from 1 and with no gaps, then your index would be equivalent to (ID-1)