home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.hp48
- Path: sparky!uunet!mcsun!chsun!bernina!colbach
- From: colbach@nessie.cs.id.ethz.ch (Philippe Colbach)
- Subject: Numerical and Analogical Computation (Part 01/02)
- Message-ID: <1992Nov23.105822.23880@bernina.ethz.ch>
- Sender: news@bernina.ethz.ch (USENET News System)
- Organization: Swiss Federal Institute of Technology (ETH), Zurich, CH
- Date: Mon, 23 Nov 1992 10:58:22 GMT
- Lines: 938
-
-
- Hi!
-
- Here's my latest library ("Numerical and Analogical Computation"). I hope
- that someone can use it ...
- Sorry for my poor English and my inability to write a documentation ...
-
- Philippe Colbach
- colbach@nessie.cs.id.ethz.ch
-
- N.B. Please contact me in case of errors!!
-
-
- NUMERICAL AND ANALOGICAL COMPUTATION
- ====================================
-
-
- Library "Numerical & Analogical Computation"
- Title: NUM
- ROMID: 958
- Bytes: 16508
- CHKSM: # 97F9h
-
- First Menu:
- [SOLV] Solving Equation
- [SYST] Solving System of Equations
- [INTG] Integrating Function
- [DIFF] Computing Differential Equation
- [ASIM] Continual Analogical Simulation
-
- Second Menu:
- [IPOL] Interpolation
- [CFIT] Curve Fitting
- [TRANS] Transforming Coordinates
-
-
- DOCUMENTATION
- =============
-
- FLAG STATE: - 2 CF symbolic representation (-> [INTG] command!)
- (-2 SF: numerical representation)
-
- -55 CF LASTARG disabled (probably wrong last arguments
- left on the stack in case of errors otherwise).
- (-55 SF: LASTARG enabled)
-
- -60 SF ALPHA in case of alpha mode (-60 will be set by
- [DIFF], [CFIT] and [TRANS])
- (-60 CF: 1ALPHA mode)
-
- The following programs have been tested for these flag states.
-
-
- [SOLV] SOLVING EQUATION
- ========================
-
- INPUT: 2: 'F(X)' or 'EQ(X)'
- 1: { RealX1 | RealX2 RealX3 | } or RealX
-
- OUTPUT: 1: X: Root
-
- DISPLAY: running: current X (after pressing any key)
- root found: root interpretation
-
- ERROR: no special error message
-
- [SOLV] uses the internal procedure of the [SOLVR] menu. No variable
- (f.e. 'EQ' or 'X') is left in the current directory. 'X' has to be the
- unknown variable (only 2 inputs!). ^^^
- ^^^^^^^^^^^^^^^^
-
- EXAMPLE: 2: 'SIN(X)'
- 1: { 3 4 }
- RAD Mode
- [SOLV] -> 1: X: 3.14159265359
- DISPLAY: Sign Reversal
-
-
- [SYST] SOLVING SYSTEM OF EQUATIONS
- ===================================
-
- INPUT: 4: 'F1(X,Y)' or 'EQ1(X,Y)'
- 3: 'F2(X,Y)' or 'EQ2(X,Y)'
- 2: RealX
- 1: RealY
-
- OUTPUT: 1: X: RootX
- 2: Y: RootY
-
- DISPLAY: running: current X and Y
-
- ERROR: no special error message
-
- [SYST] uses the Newton Algorithm. No variable is left in the current directory.
- 'F1(X,Y)' (or 'EQ1(X,Y)') and 'F2(X,Y)' (or 'EQ2(X,Y)') must be DERIVABLE!
- 'X' and 'Y' have to be the unknown variables. ^^^^^^^^^
- ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^
-
- EXAMPLE: 4: 'SQ(X)+SQ(Y)=1' circle
- 3: 'Y=SQRT(X)'
- 2: .5
- 1: .5
-
- As no root interpretation procedure is included, the program doesn't interrupt
- the computation at a sign reversal or in case of no root! The program can be
- interrupted any time by pressing [ON].
-
- [SYST] -> 2: .618033988751
- 1: .786151377759
-
- P.S. Any suggestion concerning root interpretation?
-
-
- [INTG] INTEGRATING FUNCTION
- ============================
-
- INPUT: 2: 'F(X)'
- 1: { LowerLimit UpperLimit }
-
- OUTPUT: 1: S: Integral
-
- DISPLAY: message displayed in case of numerical computation (computation
- time can be long!)
-
- ERROR: no special error message
-
- [INTG] first tries an algebraic integration, then a numerical one (message
- displayed). No variable is left in the current directory. In case of
- numerical computation, accuracy is defined by current display mode
- (STD, FIX, ENG, SCI; STD allows the best accuracy, but can take a long
- computation time, too!). 'X' has to be the unknown variable (only 2 inputs!).
- ^^^ ^^^^^^^^^^^^^^^^
- [INTG] supposes that flag -2 is CLEARED!
-
- EXAMPLE: 2: 'SIN(X)' 2: 'SIN(ABS(X))'
- 1: { 0 '2*pi' } 1: { 0 '2*pi' }
- RAD and STD mode selected
- (algebraic computation) (numerical computation)
- [INTG] -> 1: S: 0 1: S: -3.67374857952E-12
-
- EXAMPLE: 2: 'LN(X)'
- 1: { 0 e }
- (algebraic computation)
- [INTG] -> 1: S: 0
-
-
- [DIFF] COMPUTING DIFFERENTIAL EQUATION
- =======================================
-
- INPUT: none
-
- OUTPUT: none
-
- ERROR: no special error message
-
- [DIFF] enables you to compute differential equations:
-
- First EXAMPLE
- vvvvvvvvvvvvv
-
- [DIFF] -> |Enter Differential EQ
- | Y'=f(X,Y.l):
-
- Algebraic enter mode is activated. 1ALPHA in case of alpha mode. l (lambda;
- blue-shift [NXT]) represents the length of the curve arc. EDIT menu is
- activated (-> [->STK] command).
-
- |'TAN(SQ(l)/2) <ENTER>
-
- |Enter Initial Values
- | X0 and Y0:
-
- l0 (lambda0)=0 by default! EDIT menu in now desactivated ([left-shift] [+/-]
- ^^^^^^^^^^^^^^ to reactivate).
-
- | 0 <SPACE> 0 <ENTER>
-
- |Enter Computation step
- | +/-dH:
-
- Later, you can choose between two different algorithms: either dH represents
- dX or SQRT(dX^2+dY^2) (distance between points is constant=dH; this allows
- to compute differential equations representing circles f.e.).
-
- | .05 <ENTER>
-
- |>ae]-90 90[ >ae[0 360] \
- |dx=h dx=h*cosa > Algorithm formulae
- |dy=h*tana dy=h*sina /
- |Var: none Var: l=Eh (l=current length of curve arc)*
- |>4th Order >2nd Order Order of computation**
- |[ ] /\ [ ] [ ] /\ [ ] Press [/\] to choose algorthm
-
- * First alogorithm is unable to compute the current length of the curve arc.
- The computation time would have been too long!
-
- ** The first algorithm computes at a better accuracy in case of FLAT curves,
- but fails in case of GREAT gradients (around +/-90 degrees) because dX=dH
- is constant (choose the second algorithm: dH=SQRT(dX^2+dY^2)!). A 4th
- order computation in case of a variable dX would have been too difficult
- to program and the calculation too long, too!
-
- During computation of the second algorithm, RAD mode is automatically selected
- for programming reasons. ^^^^^^^^
-
- | </\>
-
- |Enter Number of Steps
- | No:
- |
- | 100 <ENTER>
-
- 100 points ( [ Xn Yn ] ) are computed and stored in '>]DAT'. The result
- is then drawn as a scale curve (if no error occures).
-
- Second EXAMPLE
- vvvvvvvvvvvvvv
-
- '>]DAT' PURGE
-
- Data points would be appended to the former computation!
-
- [DIFF] -> |'-SIN(X) <ENTER> Y'=-SIN(X) Differential equation
- | 0 <SPACE> 1 <ENTER> X0=0 and Y0=1 Initial values
- | .1 <ENTER> dH=.1 Computation step
- | </\> First algorithm (dH=dX)
-
- During computation of the first algorithm, RAD mode is *NOT* selected
- automatically as during the second one: [left-shift] [1] to select RAD.
-
- |Enter Storage Interval
- | [Xb Xe]:
-
- Xb >= X0! | 0 <SPACE> 6.3 <ENTER>
- ^^^^^^^^
- These data points are used by the second example of [IPOL] command!
-
-
- [ASIM] CONTINUAL ANALOGICAL SIMULATION
- =======================================
-
- INPUT: none
-
- OUTPUT: none
-
- [ASIM] activates a special menu:
-
- [()-[> ] DEFINE, RECALL or CLEAR Blocks
- [()-()-] CHANGE Parameter of Blocks
- [<< >> ] COMPILE analogical Structure
- [ E [> ] STORE Blocks during Computation
- [ o-[] ] SIMULATE analogical Structure
- [|__/\_] DRAW Block Curve
-
- These commands enable to define blocks and to combine them to an analogical
- structure.
-
- DEFINITION (Schaum's outline series: Theory of feedback and control systems):
- A system is an arrangement of physical components connected or related in such
- a manner as to form and/or act as an entire unit. Systems are classified into
- two general categories: OPEN-LOOP and CLOSED-LOOP systems. The distinction is
- determined by the CONTROL ACTION, which is that quantity responsible for
- activating the system to produce the output:
- - an OPEN-LOOP control system is one in which the control action is
- independent of the output.
- - an CLOSED-LOOP control system is one in which the control action is somehow
- dependent on the output.
- Both OPEN-LOOP and CLOSED-LOOP control systems can be combined.
-
- ATTENTION:
- A CLOSED-LOOP system MUST ALWAYS contain at least ONE INTEGRATOR (block type
- 50,51 or 52)! Analogical systems simulated by the [ASIM]-Program MUST ALWAYS
- include at least ONE INTEGRATOR, even in case of an OPEN-LOOP! Otherwise the
- [<< >> ]-compiler errors ("Integrator missing" or
- "Short Circuit in **"; refer to [<< >> ]).
-
- EXAMPLES
- vvvvvvvv
-
- INPUT OUTPUT-< ]-INPUT -[I>- INTEGRATOR
- | |
- INPUT-[ >-OUTPUT INPUT (t)- CURRENT TIME
-
-
- (t)---[ >---[ >---[I>---[ >---[ > (t)---[ >---[ >---[I>---[ >
- | | | |
- -------[ >---- ----< ]----
-
- ----< ]---- -[ > (t)---[ >---[ >---[ >---[I>
- | | | | |
- (t)---[ >---[ >---[I>---[ >- --[ >---
- | | |
- ----< ]---- | [ >---[I>---[ >---[ >---[ >
- | | | |
- ----------- [ >----------
-
- NOTE: -The accuracy is corresponding to the accuracy of computation of a
- differential equation using the Runge-Kutta algorithm of the
- first order ([DIFF] uses both the second and the forth order).
-
- -In fact, simulating an analogical structure means to compute
- a system of differential equations.
-
- [()-[> ], [<< >> ] and [ E [> ] create several variables in the current menu
- (named 'Omega***'). Before defining an analogical system, create a new
- directory! (Character 'Omega' = [right-shift] [EVAL])
-
-
- [()-[> ] DEFINE, RECALL or CLEAR Blocks
- ---------------------------------------
-
- DEFINE BLOCK CLEAR BLOCK RECALL BLOCK
- vvvvvvvvvvvv vvvvvvvvvvv vvvvvvvvvvvv
-
- INPUT: 4: Block Number
- 3: Block Type
- 2: { Entries } 2: Block Number
- 1: { Parameters } 1: 0 1: Block Number
-
- OUTPUT: none none 4: Block Number
- 3: Block Type
- 2: { Entries }
- 1: { Parameters }
-
- DEFINE BLOCK:
- Every block has several inputs (from other blocks or parameters), but only
- ONE output. A block is defined by its block number (its "name"), its block
- type (defining its action), its entries (from other blocks) and its
- parameters. There are special block types without any entry (0,56,60 and 100).
- Block number 100 represents the current time during computation. [()-[> ]
- always owerwrites former block definitions.
- 50 different block types are predefined (refer to block list at the end of
- this documentation), some types are undefined (f.e. 14). The creation of
- user-defined block types is possible: just create a program called
- 'Omega***' (*** > 100) computing the exact number of entries and parameters
- you indicated in the { Entires } and { Parameters } lists during definition.
- The count of E's and P's is not tested as for the predefined blocks!
-
- RECALL BLOCK:
- To recall a block definition, just enter its number. Block number, block type,
- entry list and parameter list are then put on stack.
-
- CLEAR BLOCK:
- To clear an already defined block, enter its number and a zero. In fact,
- blocks are not cleared, but replaced by the block type 60 (Null).
-
- Note: - user-defined block type program form:
- << -> E1 E2 P1 P2 P2 << ... >> >>
- Block entries (E) BEFORE parameters (P)!
-
- - A negative block entry means that the sign of the input from this
- block is automatically changed (refer to the example).
-
- - { } means NO entry or parameter (E=0 or/and P=0 in block list).
-
- - Character Omega = [right-shift] [EVAL]
-
- VARIABLES:
- OmegaBLC block entries
- OmegaPAR block parameters
- OmegaTYP block types
- OmegaINT Integrators
- OmegaDER d/dt blocks
- OmegaINIT initial values of integrators
-
- ERRORS:
- "Wrong Entry Count" Refer to block list under column E
- "Wrong Parameter Count" Refer to block list under column P
- "Type ** undefined" Refer to block list under column NBR & ACTION
- "Block ** undefined" Trying to recall an undefined block
-
-
- [()-()-] CHANGE Parameter of Blocks
- -----------------------------------
-
- INPUT: 2: Block Number
- 1: { Parameters } or Parameter (Initial Value of Integrator)
-
- OUTPUT: none
-
- This command allows to change the parameters of an ALREADY defined block.
- To simply change the initial value of an integrator (block number 50,51,52),
- just enter its block number and the initial value (not included in a list).
-
- ERRORS:
- "Wrong Parameter Count" Refer to block list under column P
- "Block ** undefined" Trying to change the parameters of an undefined block
-
-
- [<< >> ] COMPILE analogical Structure
- -------------------------------------
-
- INPUT: none
-
- OUTPUT: none
-
- Before a system can be simulated, it has to be compiled. The compiled
- system (program) is stored under global variable 'OmegaPRG'.
-
- IMPORTANT: AFTER every change (block definition or just a parameter), the
- system has to be compiled BEFORE it can be simulated!
-
- VARIABLES:
- OmegaORD order of block output computation
- OmegaPRG compiled system
-
- ERRORS:
- "Integrator missing" No integrator at all was defined
- "Short Circuit in **" Closed-loop (containing block **) without integrator
- "Block ** undefined" Block entry from an undefined block
-
-
- [ E [> ] STORE Blocks during Computation
- ----------------------------------------
-
- INPUT: 1: { Block Numbers } or { 0 }
-
- OUTPUT: none
-
- Not every block output is important. You can pick out all the outputs you are
- interested in. { 0 } means that ALL blocks are stored during computation.
- Remember that block number 100 represents the current time. [ E [> ] creates
- a program stored under global variable 'OmegaSTO'. [ E [> ] changes don't have
- to be compiled, but the storage list has to be defined before the system can
- be simulated!
-
- VARIABLES:
- OmegaSTP list of blocks to be stored during simulation
- OmegaSTO program to store blocks during simulation
-
- ERRORS: no special error message
-
-
- [ o-[] ] SIMULATE analogical Structure
- --------------------------------------
-
- INPUT: none
-
- OUTPUT: none
-
- [ o-[] ] -> |Simulation Interval:
-
- Enter the time interval (f.e. from 0 to 100, unit depends always on the
- current system):
-
- |0 <SPACE> 100 <ENTER>
-
- |Computation Step:
-
- Enter the time step of computation (f.e. 0.1):
-
- |.1 <ENTER>
-
- |Storage Step:
-
- Enter the time step of storing the blocks indicated by the command [ E [> ]:
-
- |1 <ENTER>
-
- | SIMULATING
-
- Simulation begins ... Blocks are stored under global variable '>]DAT'
-
- ERRORS:
- "Structure not compiled" Trying to simulate a non-compiled system. Refer to
- [<< >> ] command.
- "Storage List missing" Trying to simulate without indicating the blocks
- to be stored during computation. Refer to [ E [> ]
- command.
-
-
- [|__/\_] DRAW Block Curve
- -------------------------
-
- INPUT: 1: Block Number
-
- OUTPUT: none
-
- Just enter the number of the block of which you want to draw the result curve.
-
- ERRORS:
- "Block ** undefined" Trying to draw the result curve of an undefined block
- "Block ** unstored" Trying to draw the result curve of an unstored block
-
-
- BLOCK TYPE DEFINITIONS at the end of documentation
- ----------------------
-
- EXAMPLE
- -------
- __
- \___ affluent R [m^3/h]
- \___________ weir W [m^3/h]
- \ area A [m^2] ___
- \~~~~~~~~~~~~~| | \ ^
- \ depth H | | |
- \ [m] | | | initial depth of water H0=20m
- \ | | |
- \_________| | v
- | |dam: heigth=21m, width=4m
-
- Area(H)
- [m2] --------
- ------<Omega102|<---
- | (A) -------- |
- | *6* |
- | |
- Affluent(t) (1/3600) | |
- Time [h] -------- [m3/h] | v INTEGRATOR |
- (100)---->|Omega101>--------> -- [m3/h] -- [m3/s] -- [m/s] ---- [m] |
- -------- (R) (+) |15>------->|20>------->|18>--->(1)| 50 >-----|
- *1* ---> -- -- -- (dH) ---- (H) |
- |(-) *2* *3* *4* | *5* |
- | (20)=(H0) |
- *BlockNumber* | |
- --------- | Wire(H) *7* |
- |BlockType> | [m3/h] -------- |
- --------- ------------------------------------<Omega103|<---
- (W) --------
- Blocks 2,3,4,5,7 are forming a CLOSED-LOOP. | |
- Blocks 4,5,6 are also forming a CLOSED-LOOP. (21) (4)
- Both CLOSED-LOOPs contain block 5 as INTEGRATOR. Dam height Dam width
- Block 2: the input -from block 1- sign is (+),
- input -from block 7- sign is (-) ( -> outlet ).
-
- Block Definition:
-
- NBR TYPE ENTRIES PARAMETERS
-
- 1 101 { 100 } { } [()-[> ]
- 2 15 { 1 -7 } { } [()-[> ] Note input signs!
- 3 20 { 2 } { 3.6 } [()-[> ]
- 4 18 { 3 6 } { } [()-[> ]
- 5 50 { 4 } { 20 1 } [()-[> ]
- 6 102 { 5 } { } [()-[> ]
- 7 103 { 5 } { 21 4 } [()-[> ]
-
- User-defined block types:
-
- Block type 101: (Affluent)
- << -> E1 << ... >> >>
- 'Omega101' STO
-
- Block type 102: (Area: function of depth H)
- << -> E1 << ... >> >>
- 'Omega102' STO
-
- Block type 103: (Wire: function of depth H, dam height and dam width)
- << -> E1 P1 P2 << ... >> >> Block entires (E) BEFORE parameters (P)!
- 'Omega103' STO
-
- Compiling: [<< >> ]
- Storage List: { 1 5 7 } [ E [> ]
-
- Simulating: [ o-[] ] -> |0 <SPACE> 24 <ENTER> Time Interval [h]
- |.1 <ENTER> Comp. Step
- |.4 <ENTER> Storage Step
-
- Draw Curve: 5 [|__/\_] Depth Curve
-
-
- [IPOL] INTERPOLATION
- =====================
-
- INPUT: 1: RealX
-
- OUTPUT: 2: d: Derivative
- 1: Y: RealY
-
- DISPLAY: no special message displayed
-
- ERROR: "Bad >]DAT Data" >]DAT is either unexistant or not an array
- "Wrong >]DAT Size" >]DAT size has to be { n 2 }
-
- [IPOL] allows you to interpolate data points stored in growing order
- in '>]DAT':
-
- |*> [IPOL], [CFIT] and [TRANS] need '>]DAT' data under a special form:
- |*>
- |*> - '>]DAT' size = { n 2 }
- |*> - First column of '>]DAT' = Xn
- |*> - Second column of '>]DAT' = Yn
- |*> - [IPOL] ONLY: X-column in GROWING order, Xn > Xn-1!
- |*> ^^^^^^^^^^^ ^^^^^^^
- |*> [DIFF] command creates '>]DAT' in growing order if:
- |*> - dX=dH>0 (first algorithm)
- |*> - dH>0 & dX>0 (second algorithm)
-
- (Y)
- ^ (n)
- (1) | x
- x (2) (n-1)
- x| x
- :| x x :
- :| x :
- :| :
- --------:-------------:------> (X)
- :| :
- : :
- -------><-------------><--------
- 2nd 5th 2nd polynomial degree (of interpolation)
-
- First EXAMPLE
- vvvvvvvvvvvvv
-
- Let's create such a '>]DAT' variable:
-
- '>]DAT' PURGE ([DIFF] appends data points to former computation)
-
- [DIFF] -> | l <ENTER> Y'=l (lambda)
- | 0 <SPACE> 1 <RETURN> X0=0, Y0=1
- | .1 <ENTER> dH=.1
- | </\> second algorithm (2nd order, var: l)
- | 10 <ENTER> 10 points
-
- Differential equation Y'=l [Gradient a function of the length of the curve arc]
- => Y=COSH(X) !!
- That's why I proposed the initial values X0=0 and Y0=1!
-
- [IPOL] interpolates the data points from the '>]DAT' variable:
-
- .5 [IPOL] -> d(.5)/dX= 0.510410896178 | SINH(0.5)= 0.521095305494
- Y= 1.127241126120 | COSH(0.5)= 1.127625965210
-
- These data points are also used by the example of [CFIT] command.
-
- Second EXAMPLE
- vvvvvvvvvvvvvv
-
- Use the data points from the second example of [DIFF] command.
-
- As Y'=-SIN(X), Y=COS(X). Let's try to find the root X=pi/2 by using [IPOL]
- and [SOLV]. As [IPOL] has two tagged outputs, we have to create a program
- (function form) which has only the (real) output Y:
- << -> X << X IPOL SWAP DROP 0 + >> >> 'FCN' STO
-
- 2: 'FCN(X)'
- 1: { 1 2 }
-
- [SOLV] -> 1: X: 1.57077308547
- and: pi/2= 1.57079632680
-
- Note: -Program with Y output (as real):
- << -> X << X IPOL SWAP DROP 0 + >> >>
- -Program with dY/dX output (as real):
- << -> X << X IPOL DROP 0 + >> >>
- Internal ROOT and DRAW commands don't accept tagged arguments; neither do
- [SOLV] and [INTG]!
-
-
- [CFIT] CURVE FITTING
- =====================
-
- INPUT: none
-
- OUTPUT: 1: Correlation
-
- ERROR: "Bad >]DAT Data" >]DAT is either unexistant or not an array
- "Wrong >]DAT Size" >]DAT size has to be { n 2 }
-
- [CFIT] fits the data points from the '>]DAT' variable. HP48 Curve Fitting
- program offers only 4 base modles, but [CFIT] allows user modles:
-
- For this example, we use the data points from the first example of [IPOL].
-
- [CFIT] -> | Curve Fitting Modles
- |LIN: B + f(X)*M = g(Y)
- |PWR: B * f(X)^M = g(Y)
- |
- |[LIN] [] [] [] [] [PWR]
-
- [CFIT] proposes 2 base modles, f(X) and g(Y) can be ANY function of X and Y!
- ^^^^^^^^^^^^^^^^^^^^^^^
- |[LIN]
-
- |Modle: LINFIT
- |B + f(X) *M= g(Y)
- |Enter Function f(X):
- ^
- Algebraic enter mode is activated. 1ALPHA in case of alpha mode. EDIT menu
- is activated (-> [->STK] command).
-
- |'COSH(X) <ENTER>
-
- Just typing <ENTER> would mean that g(X)=X!
-
- |Modle: LINFIT
- |B + f(X) *M= g(Y)
- |Enter Function g(Y):
- ^
- |' <ENTER>
-
- Typing just <ENTER> means that g(Y)=Y.
-
- |Enter >]LINE Name:
-
- ALPHA mode is activated. You can enter a function name for the curve.
-
- |APRX <ENTER>
-
- |Defining >]LINE FCN
-
- 1: Correlation:
- .999999996453
-
- Test: 0.5 [APRX] -> 1.12739143401 (accuracy better then [IPOL]!)
- 0.5 [IPOL] -> 1.12724112612
- 0.5 [COSH] -> 1.12762596521
-
-
- [TRANS] TRANSFORMING COORDINATES
- =================================
-
- INPUT: none
-
- OUTPUT: none
-
- ERROR: "Bad >]DAT Data" >]DAT is either unexistant or not an array
- "Wrong >]DAT Size" >]DAT size has to be { n 2 }
-
- [TRANS] transforms data points from the '>]DAT' variable.
-
- '>]DAT' PURGE
- [DIFF] -> |'TAN(l) <ENTER> (lambda: [right-shift] [NXT])
- | 0 <SPACE> -1 <ENTER> X0=0 and Y0=-1
- | .1 <ENTER> dH=.1
- | </\> algorithm able to compute l (lambda)
- | 63 <ENTER> 63 points
-
- [TRANS] -> |Enter X-Transformation
- |X1=f(X,Y,a,r)
-
- a = ATAN(Y/X) >[blue-shift] [A]
- r = SQRT(SQ(X)+SQ(Y)) >[blue-shift] [->]
- [X Y] = cartesian coordinates
- [a r] = polar coordinates
-
- Algebraic enter mode is activated. 1ALPHA is case of alpha mode. EDIT menu
- is activated (-> [->STK] command).
-
- |'X*SIN(2*a) <ENTER>
-
- Just typing <ENTER> would mean that X1=X!
-
- |Enter Y-Transformation
- |Y1=g(X,Y,a,r)
-
- |'Y*SIN(2*a) <ENTER>
-
- Just typing <ENTER> would mean that Y1=Y!
-
- |Transforming (X,Y)
-
- Data points are transformed and drawn as a scale curve.
-
-
- BLOC DEFINITIONS
- ================
-
- NBR TYPE ACTION E P
-
- 0* NULL ENTRY E0=0 - -
- 1 ABSOLUTE VALUE E0=ABS(E1) 1 0
- 2 SIGN E0=SIGN(E1) 1 0
- 3 NEGATIVE VALUE E0=-E1 1 0
- 4 SIGN TRANFER E0=E1*SIGN(E2) 2 0
- 5 CLIP NEGATIVE E0=IFTE(E1>0,E1,0) 1 0
- 6 CLIP POSITIVE E0=IFTE(E1>0,0,E1) 1 0
- 7 FREE SPACE E0= * [see below] 1 2
- 8 LIMIT E0= * [see below] 1 2
- 9 SCALE E0= * [see below] 1 3
- 10 RELAY 1 E0=IFTE(E1>=0,E2,E3) 3 0
- 11 RELAY 2 E0=IFTE(E1>0,E2,0) 2 0
- 12 MINIMUM E0=MIN(E1,E2) 2 0
- 13 MAXIMUM E0=MAX(E1,E2) 2 0
- 14*
- 15 ADDITION 2 E0=E1+E2 2 0
- 16 ADDITION 3 E0=E1+E2+E3 3 0
- 17 MULTIPLICATION E0=E1*E2 2 0
- 18 DIVISION E0=E1/E2 2 0
- 19 ADDITION CONSTANT E0=E1+P1 1 1
- 20 MULTIPLICATION CONSTANT E0=E1*P1 1 1
- 21 ADD+MUL 2 E0=E1*P1+E2*P2 2 2
- 22 ADD+MUL 3 E0=E1*P1+E2*P2+E3*P3 3 3
- 23*
- 24*
- 25 INVERSE E0=INV(E1) 1 0
- 26 SQUARE E0=SQ(E1) 1 0
- 27 SQUARE ROOT E0=SQRT(E1) 1 0
- 28 POWER E0=E1^E2 2 0
- 29 POLYNOMIAL E0=P1+P2*E1+P3*E1^2 1 3
- 30 COMMON LOGARITHM E0=P1*LOG(E1+P2)+P3 1 3
- 31 COMMON EXPONENTIAL E0=P1*ALOG(E1*P2)+P3 1 3
- 32 NATURAL LOGARITHM E0=P1*LN(E1+P2)+P3 1 3
- 33 NATURAL EXPONENTIAL E0=P1*EXP(E1*P2)+P3 1 3
- 34*
- 35*
- 36 SINE E0=P1*SIN(E1*P2+P3) 1 3
- 37 COSINE E0=P1*COS(E1*P2+P3) 1 3
- 38 TANGENT E0=P1*TAN(E1*P2+P3) 1 3
- 39 ARC SINE E0=P1*ASIN(E1*P2+P3) 1 3
- 40 ARC COSINE E0=P1*ACOS(E1*P2+P3) 1 3
- 41 ARC TANGENT E0=P1*ATAN(E1*P2+P3) 1 3
- 42 SINE HYPERBOLIC E0=P1*SINH(E1*P2+P3) 1 3
- 43 COSINE HYPERBOLIC E0=P1*COSH(E1*P2+P3) 1 3
- 44 TANGENT HYPERBOLIC E0=P1*TANH(E1*P2+P3) 1 3
- 45 ARC SINE HYPERBOLIC E0=P1*ASINH(E1*P2+P3) 1 3
- 46 ARC COSINE HYPERBOLIC E0=P1*ACOSH(E1*P2+P3) 1 3
- 47 ARC TANGENT HYPERBOLIC E0=P1*ATANH(E1*P2+P3) 1 3
- 48*
- 49*
- 50 INTEGRATION 1 E0=P1+Integral[E1*P2]dt 1 2
- 51 INTEGRATION 2 E0=P1+Integral[E1*P2+E2*P3]dt 2 3
- 52 LIMIT INTEGRATION E0=P1+Integral[E1]dt,P2<=E0<=P3 1 3
- 53 DERIVATIVE ** [see below] E0=dE1/dt 1 0
- 54*
- 55*
- 56 RANDOM E0=RAND 0 0
- 57 CONSTANT E0=P1 0 1
- 58 QUIT quit if E1>E2 2 0
- 59*
- 60 NULL E0=0 0 0
- 61*
- 62*
- 63*
- 64*
- 65*
- 66*
- 67*
- 68*
- 69*
- 70*
- 71*
- 72*
- 73*
- 74*
- 75*
- 76*
- 77*
- 78*
- 79*
- 80*
- 81*
- 82*
- 83*
- 84*
- 85*
- 86*
- 87*
- 88*
- 89*
- 90*
- 91*
- 92*
- 93*
- 94*
- 95*
- 96*
- 97*
- 98*
- 99*
- 100* CURRENT TIME E0=current time - -
-
- nn* undefined block type
- 0* can only be used to determine a null entry (En=0) in entry list
- 100* can only be used as time input in entry list
-
- ** Block 53: derivative through the last 3 points
-
- Note: - Input E---[D>---O Output
- O=dE/dt
-
- - Input E---[I>---[D>---O Output
- O is NOT equal to E for algorithm reasons:
-
- TIME t INPUT E INTEGRAL I OUTPUT O
- tn En In On-1 (using In-3, In-2 and In-1)
- tn+1 En+1 In+1 On (using In-2, In-1 and In)
-
- On(tn+1)=En(tn)!
-
- *** > 100 USER DEFINED BLOCKS
-
- N.B. Any suggestion about new block types?
-
-
- Block 7
- -------
-
- ^ ^ / ^
- | | / \ |
- | / | 1:1 / \ 1:1 |
- | 1:1 / | / \ |
- P1 | / | P1 / \ |P1
- ----:=====|=====:---> --|--:=====:--------> ----:=====|=:------->
- / | P2 | / P2 P2 | \
- / | |/ | \
- / 1:1 | / 1:1 |1:1 \
- / | /| | \
- | | | \
-
- P1 < P2 P1 < P2 P1 > P2
-
-
- Block 8
- -------
-
- P2- ------ ^ ^
- | / P2- ------------ ------- - -P2
- | / 1:1 | / \ |
- | / | / 1:1 1:1 \ |
- P1 |/ | / \| P1
- ------:---|----:----> ---P1- ------:---|----:---->
- /| P2 | P2 |\
- 1:1 / | | P1 | \
- / | --|--:---:----------> | \ 1:1
- ------- -P1 | P2 | \
- | | -P1 - ------
-
- P1 < P2 P1 < P2 P1 > P2
-
-
- Block 9
- -------
- P2>0
- ^ <-------> ^
- | ------ P1 | |
- - P3 / ====:-----|-:-------> --------- - P3
- | / \ | P1+P2 \|
- | / P3:P2 \ | \
- | / \ | |\ P3:P2
- | / P3:P2 \ | | \
- | / \| P1+P2 | \
- ==|=====:------:----> \ --------:-|---:=====>
- | P1 P1+P2 |\ | P1
- | <------> P3- --------- <----->
- P2>0 P2<0
-
-