This is a simple but very useful macro for function sampling
It can generate samples of multivariate functions such as:
f (x) , f (x
) .... f (x
, ... x
The samples can be arranged in a list or in a table (only for 2 variables).
Examples of lists and tables generated by this macro are shown in the following sheet
The tables at the top are the skeletons to generate the samples-list or the samples-table just
below. The skeleton contains the following parameters for the sampler.
starting point of the variable X
number of samples to generate: N
length of the sampling: P
length between two consecutive point H = X
True or False (default), specifies if the function is periodic with period P.
The difference between a cyclic or no-cyclic function is in the step formula
S = P / N for cyclic function
S = P / (N-1) for no-cyclic function
For example, the sampling with N = 5, X
= 0 and P = 2, needs a step H = 0.5
The first point and the last point, in this case, are always taken.
But, for a periodic function, the same sampling needs a step of H = 0.4
Practically, the last point X = 2, in this case, is discharged, because is f(0) = f(2). Usually
periodic functions require to set Cyclic = “True” for the FT analysis
The skeleton can be drawn by hand or
automatically. In this case you have only to give
the number of variables that you want.
The check-box “Function seed” tells the macro
to created also the cell in which you can insert
the function to sample