Examples ======== Case of a function ------------------ Define function FORMULE sin (t) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: text IF = FORMULE (NOM_PARA = 'INST', VALE = 'sin (INST) ') Tabulate sin (t) from a list of reals ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: text DEPI = 2. *pi PAS0 = DEPI /200. LI1 = DEFI_LIST_REEL (DEBUT = 0, INTERVALLE =_F (JUSQU_A = DEPI, PAS = PAS0),) SI1 = CALC_FONC_INTERP (FONCTION = YES, LIST_PARA = LI1, NOM_RESU = 'DEPL', PROL_GAUCHE =' EXCLU ', PROL_DROITE =' CONSTANT', INTERPOL =' LIN ', TITRE =' FONCTION SINUS') Tabulate sin (t) from a list of values ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: text LI2 = (0.,0.01,0.03,0.03,0.04,0.04,0.05,0.06,0.07,0.08,0.09,0.10) SI2 = CALC_FONC_INTERP (FONCTION = YES, VALE_PARA = LI2, NOM_PARA =' INST ', PROL_GAUCHE = 'EXCLU', PROL_DROITE = 'EXCLU', INTERPOL = 'LIN', TITRE = 'FONCTION SINUS') .. _RefHeading__1563_658656932: Case of a tablecloth --------------- Define function FORMULE sin (omega*t) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: text IF = FORMULE (NOM_PARA = ('FREQ', 'INST'), VALE = 'sin (2*pi* FREQ * INST) ') Tabulate sin (omega*t) from a list of moments ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The tablecloth parameter is' FREQ ', the variable for the functions defining the tablecloth is' INST '. We check in CALC_FONC_INTERP that the first parameter of the formula is the same as NOM_PARA, and that the second parameter of the formula is identical to NOM_PARA_FONC. .. code-block:: text LI_FREQ = DEFI_LIST_REEL (DEBUT = 10, INTERVALLE =_F (JUSQU_A =100, PAS =10),) LI_INST = DEFI_LIST_REEL (DEBUT = 0, INTERVALLE =_F (JUSQU_A =100, PAS =1),) SI1 = CALC_FONC_INTERP (FONCTION = YES, NOM_RESU = 'DEPL', NOM_PARA_FONC =' INST ', LIST_PARA_FONC = LI_INST PROL_GAUCHE_FONC =' EXCLU ', PROL_DROITE_FONC =' CONSTANT ', INTERPOL_FONC =' LIN ', NOM_PARA =' FREQ ', LIST_PARA = LI_FREQ PROL_GAUCHE =' LINEAIRE ', PROL_DROITE =' LINEAIRE ', INTERPOL =' LIN ', TITRE =' FONCTION SINUS ',)