AddFunction
Public Sub AddFunction(Func$, nX As Integer, x0 As Single, X1 As Single, nY As Integer, y0 As Single, Y1 As Single, Optional z0 As Single = 0)
Defines a math function to plot. Note that there only two ways to define the data to plot: AddFunction and AddDataArray. Only one of these should be used in each graph. a function of the x- and y-values, ie of the form z = f(x, y). See Demo1 as an example. The function uses conventional syntax, the main math operators + - * / ^, logical operators, and some internal functions
Parentheses: ( ) ,
Basic operators: + - * / ^ with conventional operator precedence
Integer operators: \ mod
Logical operators: = < <= > >= <> not or xor
Internal functions: abs int fix sgn rnd sqr log ln exp sin asin cos acos tan atn sinh asinh cosh acosh tahn atanh fact min max nCr nPr iif
Constants: pi=3.14159265358979, deg (convert radians to degrees) Example: "iif(x>1, 2*y, 0)" --> if x is greater than one return "2*y" else return "0" z0 setting then bar graphs will be split with higher values pointing up and lower values down.
Example..
Call .AddFunction("2*(sin(x)+sin(y))", 8, 1, 4, 8, 1, 4, -4)
|