$$$$ PROG NOTICE CHAT 11/09/12 21:17:45 7124 DATE 11/09/12 Operateur PROG Voir aussi : LECT -------------- LREEL1 = PROG 1. 2. 3. 4. 5. ; Description : ____________ The PROG operator creates a LREEL1 object of LISTREEL type from an arbitrary number of ENTIER or FLOTTANT type objects. The PAS subinstruction is used to produce numbers spaced equally apart, and the * subinstruction is used to repeat a number. In addition, options corresponding to some functions are available. Comments : _________ ------------------------ | PAS subinstruction | ------------------------ LREEL1 = PROG 1. PAS 2. 5. ; amounts to : LREEL1 = PROG 1. 3. 5. ; If PAS does not split up the gap, the value to be taken into account is the closest one likely to do it. If PAS is incoherent, the result will contain the initial value and the final value. Other possibility : LREEL1 = PROG 1. PAS 2. NPAS 2 ; amounts to : LREEL1 = PROG 1. 3. 5. ; NPAS must be positive or null. ----------------------- | Subinstruction * | ----------------------- LREEL1 = PROG 4 * 3. ; amounts to : LREEL1 = PROG 3. 3. 3. 3. ; Negative steps may be used simultaneously with subinstructions. LREEL1 = PROG 1. 2. PAS -2. -6. 2. 3. * 9. PAS 2. 3. * 13. ; or LREEL1 = PROG 1. 2. PAS -2. NPAS 4 2. 3. * 9. PAS 2. 3. * 13. ; amounts to LREEL1 = PROG 1. 2. 0. -2. -4. -6. 2. 9. 9. 9. 11. 13. 13. 13.; ------------------ | SINU option | ------------------ LREEL1 = PROG 'SINU' FLOT1 ('PHAS' FLOT2) ('AMPL' FLOT3) ... ... | PROG 1. 2. ..X.. 4. 5. | ; | LREEL2 | The SINU option for the PROG operator is used to produce a list of real numbers sine from : - an arbitrary number of ENTIER or FLOTTANT type objects - a LISTREEL type object ( FLOT3 * SIN ( 360*FLOT1*X + FLOT2 ) ) is associated with X LREEL2 : LISTREEL type object FLOT1 : frequency in Hz (positive FLOTTANT type) 'PHAS' : key word followed by : FLOT2 : phase value in degrees (FLOTTANT type) equalling 0. by default. 'AMPL' key word followed by : FLOT3 : sine amplitude value (positive FLOTTANT type) equalling 1. by default. Note : ________ Of course, you may employ the PAS and * instructions for this option. --------------------------------- | LINE , EXPO , LOGA options | --------------------------------- |'LINE'| LREEL1 = PROG |'EXPO'| ('A' A1) ('B' B1) | PROG 1. 2. ..X.. 4. 5. | |'LOGA'| | LREEL2 | The 'LINE', 'EXPO' and 'LOGA' options calculate the values for the following functions : A1*X+B1 for the 'LINE' option EXP(A1*X+B1) for the 'EXPO' option LOG(A1*X+B1) for the 'LOGA' option for the values of the X-variable contained in the LREEL2 object of LISTREEL type or specified after the 'PROG' key word. LREEL2 : LISTREEL type object 'A' : key word followed by : A1 : value of FLOTTANT type, equalling 1. by default. 'B' : key word followed by : B1 : value of FLOTTANT type, equalling 0. by default.
© Cast3M 2003 - All rights reserved.
Disclaimer