How to extract value from range by only using cut function in generate attribute

tomarriott
tomarriott New Altair Community Member
edited November 2024 in Community Q&A
Tagged:

Welcome!

It looks like you're new here. Sign in or register to get started.

Best Answers

  • Caperez
    Caperez Altair Community Member
    edited April 2021 Answer ✓
    Hi @tomarriott

    The cut function "cut" the nominal attribute using the position of characters. the first argument is the attribute, the second argument is to know from where begin to count and the third argument is for the lenght of extracted string.

    for the example propused in your message, in order to extract the "1" character from the attribute, the configuration of cut function must be 
    cut(yournominalattribute,3,4)

    Best
  • Caperez
    Caperez Altair Community Member
    Answer ✓
    Hi @tomarriott,

    The function cut works in any row of your attribute (colum)
    taking for example the first row in your attribute Maximum(order_data) [-∞ -38.0] the [ corresponds to 0 position, - corresponds to 1 position, etc.
    if you want to extract the "38" characters your cut function must be like cut(Maxi, 4, 2). This cut function will extract the string "0-" in second row. 
     make sure that your attribute is nominal

    Best

Answers

  • Caperez
    Caperez Altair Community Member
    edited April 2021 Answer ✓
    Hi @tomarriott

    The cut function "cut" the nominal attribute using the position of characters. the first argument is the attribute, the second argument is to know from where begin to count and the third argument is for the lenght of extracted string.

    for the example propused in your message, in order to extract the "1" character from the attribute, the configuration of cut function must be 
    cut(yournominalattribute,3,4)

    Best
  • tomarriott
    tomarriott New Altair Community Member
    If there have 22 samples in an attribute Maximum(order_data), can I formate formulas cut(Maximum(order_data),1,22) in order to count all example
  • Caperez
    Caperez Altair Community Member
    Answer ✓
    Hi @tomarriott,

    The function cut works in any row of your attribute (colum)
    taking for example the first row in your attribute Maximum(order_data) [-∞ -38.0] the [ corresponds to 0 position, - corresponds to 1 position, etc.
    if you want to extract the "38" characters your cut function must be like cut(Maxi, 4, 2). This cut function will extract the string "0-" in second row. 
     make sure that your attribute is nominal

    Best

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.