4.8.3.102. SWEEP
Language type |
Subroutine |
FORTRAN |
call rd_sweep(x, a, x0, f0, x1, f1, xdot, value, errflg) or sweep(x, a, x0, f0, x1, f1, xdot, value, errflg) |
C/C++ |
rd_sweep(x, a, x0, f0, x1, f1, xdot, &value, &errflg) or sweep(x, a, x0, f0, x1, f1, xdot, &value, &errflg) |
Variable Name |
Size |
Description |
x |
double |
Specify the independent variable. |
a |
double |
The amplitude of the sinusoidal function. |
x0 |
double |
Starting point of the SWEEP function (x value) |
f0 |
double |
Initial sine function frequency. |
x1 |
double |
Ending point of the SWEEP function. (x value) |
f1 |
double |
Ending frequency of the sine function. |
xdot |
double |
Range in which the SWEEP function is fully active |
value |
double |
\(\text{SWEEP=STEP5}(x,{{x}_{0}},0,{{x}_{0}}+xdot,1)+a\sin (2\pi \int{freq(x)dx})\) \(freq(x)=\left\{ \begin{array}{*{35}{l}} {{f}_{0}} & x\le {{x}_{0}} \\ {{f}_{0}}+\frac{{{f}_{1}}-{{f}_{0}}}{{{x}_{1}}-{{x}_{0}}}x & {{x}_{0}}\le x\le {{x}_{1}} \\ {{f}_{1}} & x\ge {{x}_{1}} \\ \end{array} \right.\) \(\int{freq(x)dx}=\left\{ \begin{array}{*{35}{l}} {{f}_{0}}x & x\le {{x}_{0}} \\ {{f}_{0}}{{x}_{0}}+{{f}_{0}}(x-{{x}_{0}})+0.5\frac{{{f}_{1}}-{{f}_{0}}}{{{x}_{1}}-{{x}_{0}}}{{(x-{{x}_{0}})}^{2}} & {{x}_{0}}\le x\le {{x}_{1}} \\ {{f}_{0}}{{x}_{0}}+{{f}_{0}}(x-{{x}_{0}})+0.5\frac{{{f}_{1}}-{{f}_{0}}}{{{x}_{1}}-{{x}_{0}}}{{({{x}_{1}}-{{x}_{0}})}^{2}}+{{f}_{1}}(x-{{x}_{1}}) & x\ge {{x}_{1}} \\ \end{array} \right.\) |
errflg |
logical |
If an error is encountered in invoking Predefined subroutine, this variable becomes true. This variable must be declared as a logical variable. |