• Resolved caidad

    (@caidad)


    Bonjour,
    j’ai inséré un tableau CSV de prix ( x = hauteur, y = largeur ).
    J’aimerai arrondir le prix de sorti de mon tableau au niveau inférieur et non au niveau supérieur à partir de la valeur moitié de la valeur ajouter par l’utilisateur.
    Voici un exemple de mon tableau:
    x1=800 x2=900
    y1=800 y2=900

    lorsque l’utilisateur rentre en paramètre x1(hauteur)=849 et y1(largeur)=800 le tableau resort la valeur en x1,y1 (jusque là tout va bien); cependant si l’utilisateur rentre en paramètre x1=850 et y1=800 le tableau ressort la valeur supérieur c’est-à-dire la valeur en x2,y1

    Comment faire pour que le tableau sorte la valeur inférieur tant que l’utilisateur entre une valeur compris entre 800 et 899 ? ( mon tableau x(800,…,3500) y(800,…,3000) )

    Merci beaucoup de me venir en aide
    Cordialement
    Antoine

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author moomooagency

    (@moomooagency)

    Hi,

    Please, write in English. Thanks

    Thread Starter caidad

    (@caidad)

    Hi,
    I have inserted a CSV price table ( x = height, y = width ).
    I would like to round the output price of my table to the lower level and not to the upper level from the value half of the value added by the user.
    Here is an example of my table:
    x1=800 x2=900
    y1=800 y2=900

    if the user enters in parameter x1(height)=849 and y1(width)=800 the table returns the value in x1,y1 (that’s good for now); however if the user enters in parameter x1=850 and y1=800 the table returns the higher value, i.e. the value in x2,y1.

    How to make the array output the lower value as long as the user enters a value between 800 and 899 ? ( my table x(800,…,3500) y(800,…,3000) )

    Thank you so much for helping me
    Antoine

    I also fought with it. And I gave up … do it … it works for me…
    2nd var/1st var 300 301 400 401 500 501 600 601 …
    300
    301
    400
    401
    500

    Thread Starter caidad

    (@caidad)

    Hi,
    Thanks for your answer but it works if I inject 99 columns between each value … this is not viable at all.

    I’ll keep looking and hope @moomooagency will offer me a solution.

    See you soon I hope,
    Antoine

    Plugin Author moomooagency

    (@moomooagency)

    @caidad actually @zimart told you how to achieve this. But you can also use this trick:

    1) create these new NOVs: NOV1 with formula floor(x/100)*100 and NOV2 with formula floor(y/100)*100
    2) did you get it already?)) if x=800, then NOV1=800, if x=856, then NOV1=800; it is because you get 8.56 in the last example, then function floor makes it 8 and then multiplying to 100 makes it 800
    3) use NOV1 and NOV2 in your matrix

    Plugin Author moomooagency

    (@moomooagency)

    Also, maybe try this formula floor(x/100, 0)*100 where argument ‘0’ tells func to round to integer value. Just in case, maybe it works also as I told you in prev comment, just do not remember for sure.

    • This reply was modified 4 years, 11 months ago by moomooagency.
    • This reply was modified 4 years, 11 months ago by moomooagency.
    Thread Starter caidad

    (@caidad)

    Thanks a lot,

    That’s what i needed.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Configuration Matrix’ is closed to new replies.