Mercurial > hg > octave-nkf
changeset 9211:f0c3d3fc4903
Simplify Texinfo documentation in .m scripts by removing redundant @iftex calls
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,8 @@ +2009-05-17 Rik Wehbring <rdrider0-list@yahoo.com> + + * *.m: Simplify Texinfo documentation in .m scripts by removing + redundant @iftex calls + 2009-05-17 Jaroslav Hajek <highegg@gmail.com> * optimization/fminunc.m: Improve TR updating strategy.
--- a/scripts/general/diff.m +++ b/scripts/general/diff.m @@ -21,11 +21,9 @@ ## @deftypefn {Function File} {} diff (@var{x}, @var{k}, @var{dim}) ## If @var{x} is a vector of length @var{n}, @code{diff (@var{x})} is the ## vector of first differences -## @iftex ## @tex ## $x_2 - x_1, \ldots{}, x_n - x_{n-1}$. ## @end tex -## @end iftex ## @ifnottex ## @var{x}(2) - @var{x}(1), @dots{}, @var{x}(n) - @var{x}(n-1). ## @end ifnottex
--- a/scripts/general/logspace.m +++ b/scripts/general/logspace.m @@ -21,39 +21,31 @@ ## @deftypefn {Function File} {} logspace (@var{base}, @var{limit}, @var{n}) ## Similar to @code{linspace} except that the values are logarithmically ## spaced from -## @iftex ## @tex ## $10^{base}$ to $10^{limit}$. ## @end tex -## @end iftex ## @ifnottex ## 10^base to 10^limit. ## @end ifnottex ## ## If @var{limit} is equal to -## @iftex ## @tex ## $\pi$, ## @end tex -## @end iftex ## @ifnottex ## pi, ## @end ifnottex ## the points are between -## @iftex ## @tex ## $10^{base}$ and $\pi$, ## @end tex -## @end iftex ## @ifnottex ## 10^base and pi, ## @end ifnottex ## @emph{not} -## @iftex ## @tex ## $10^{base}$ and $10^{\pi}$, ## @end tex -## @end iftex ## @ifnottex ## 10^base and 10^pi, ## @end ifnottex
--- a/scripts/linear-algebra/commutation_matrix.m +++ b/scripts/linear-algebra/commutation_matrix.m @@ -20,57 +20,45 @@ ## -*- texinfo -*- ## @deftypefn {Function File} {} commutation_matrix (@var{m}, @var{n}) ## Return the commutation matrix -## @iftex ## @tex ## $K_{m,n}$ ## @end tex -## @end iftex ## @ifnottex ## K(m,n) ## @end ifnottex ## which is the unique -## @iftex ## @tex ## $m n \times m n$ ## @end tex -## @end iftex ## @ifnottex ## @var{m}*@var{n} by @var{m}*@var{n} ## @end ifnottex ## matrix such that -## @iftex ## @tex ## $K_{m,n} \cdot {\rm vec} (A) = {\rm vec} (A^T)$ ## @end tex -## @end iftex ## @ifnottex ## @math{K(m,n) * vec(A) = vec(A')} ## @end ifnottex ## for all -## @iftex ## @tex ## $m\times n$ ## @end tex -## @end iftex ## @ifnottex ## @math{m} by @math{n} ## @end ifnottex ## matrices -## @iftex ## @tex ## $A$. ## @end tex -## @end iftex ## @ifnottex ## @math{A}. ## @end ifnottex ## ## If only one argument @var{m} is given, -## @iftex ## @tex ## $K_{m,m}$ ## @end tex -## @end iftex ## @ifnottex ## @math{K(m,m)} ## @end ifnottex
--- a/scripts/linear-algebra/duplication_matrix.m +++ b/scripts/linear-algebra/duplication_matrix.m @@ -20,47 +20,37 @@ ## -*- texinfo -*- ## @deftypefn {Function File} {} duplication_matrix (@var{n}) ## Return the duplication matrix -## @iftex ## @tex ## $D_n$ ## @end tex -## @end iftex ## @ifnottex ## @math{Dn} ## @end ifnottex ## which is the unique -## @iftex ## @tex ## $n^2 \times n(n+1)/2$ ## @end tex -## @end iftex ## @ifnottex ## @math{n^2} by @math{n*(n+1)/2} ## @end ifnottex ## matrix such that -## @iftex ## @tex ## $D_n * {\rm vech} (A) = {\rm vec} (A)$ ## @end tex -## @end iftex ## @ifnottex ## @math{Dn vech (A) = vec (A)} ## @end ifnottex ## for all symmetric -## @iftex ## @tex ## $n \times n$ ## @end tex -## @end iftex ## @ifnottex ## @math{n} by @math{n} ## @end ifnottex ## matrices -## @iftex ## @tex ## $A$. ## @end tex -## @end iftex ## @ifnottex ## @math{A}. ## @end ifnottex
--- a/scripts/linear-algebra/expm.m +++ b/scripts/linear-algebra/expm.m @@ -20,13 +20,11 @@ ## @deftypefn {Function File} {} expm (@var{a}) ## Return the exponential of a matrix, defined as the infinite Taylor ## series -## @iftex ## @tex ## $$ ## \exp (A) = I + A + {A^2 \over 2!} + {A^3 \over 3!} + \cdots ## $$ ## @end tex -## @end iftex ## @ifnottex ## ## @example @@ -38,30 +36,24 @@ ## exponential; see Moler and Van Loan, @cite{Nineteen Dubious Ways to ## Compute the Exponential of a Matrix}, SIAM Review, 1978. This routine ## uses Ward's diagonal -## @iftex ## @tex ## Pad\'e ## @end tex -## @end iftex ## @ifnottex ## Pade' ## @end ifnottex ## approximation method with three step preconditioning (SIAM Journal on ## Numerical Analysis, 1977). Diagonal -## @iftex ## @tex ## Pad\'e ## @end tex -## @end iftex ## @ifnottex ## Pade' ## @end ifnottex ## approximations are rational polynomials of matrices -## @iftex ## @tex ## $D_q(a)^{-1}N_q(a)$ ## @end tex -## @end iftex ## @ifnottex ## ## @example @@ -73,30 +65,24 @@ ## ## @end ifnottex ## whose Taylor series matches the first -## @iftex ## @tex ## $2 q + 1 $ ## @end tex -## @end iftex ## @ifnottex ## @code{2q+1} ## @end ifnottex ## terms of the Taylor series above; direct evaluation of the Taylor series ## (with the same preconditioning steps) may be desirable in lieu of the -## @iftex ## @tex ## Pad\'e ## @end tex -## @end iftex ## @ifnottex ## Pade' ## @end ifnottex ## approximation when -## @iftex ## @tex ## $D_q(a)$ ## @end tex -## @end iftex ## @ifnottex ## @code{Dq(a)} ## @end ifnottex
--- a/scripts/linear-algebra/planerot.m +++ b/scripts/linear-algebra/planerot.m @@ -19,11 +19,9 @@ ## -*- texinfo -*- ## @deftypefn {Function File} {[@var{g}, @var{y}] =} planerot (@var{x}) ## Given a two-element column vector, returns the -## @iftex ## @tex ## $2 \times 2$ orthogonal matrix ## @end tex -## @end iftex ## @ifnottex ## 2 by 2 orthogonal matrix ## @end ifnottex
--- a/scripts/miscellaneous/bincoeff.m +++ b/scripts/miscellaneous/bincoeff.m @@ -20,13 +20,11 @@ ## -*- texinfo -*- ## @deftypefn {Mapping Function} {} bincoeff (@var{n}, @var{k}) ## Return the binomial coefficient of @var{n} and @var{k}, defined as -## @iftex ## @tex ## $$ ## {n \choose k} = {n (n-1) (n-2) \cdots (n-k+1) \over k!} ## $$ ## @end tex -## @end iftex ## @ifnottex ## ## @example
--- a/scripts/miscellaneous/namelengthmax.m +++ b/scripts/miscellaneous/namelengthmax.m @@ -20,11 +20,9 @@ ## @deftypefn {Function File} {} namelengthmax () ## Returns the @sc{matlab} compatible maximum variable name length. Octave is ## capable of storing strings up to -## @iftex ## @tex ## $2^{31} - 1$ ## @end tex -## @end iftex ## @ifnottex ## @code{2 ^ 31 - 1} ## @end ifnottex
--- a/scripts/optimization/glpk.m +++ b/scripts/optimization/glpk.m @@ -21,13 +21,11 @@ ## Solve a linear program using the GNU GLPK library. Given three ## arguments, @code{glpk} solves the following standard LP: ## -## @iftex ## @tex ## $$ ## \min_x C^T x ## $$ ## @end tex -## @end iftex ## @ifnottex ## @example ## min C'*x @@ -36,13 +34,11 @@ ## ## subject to ## -## @iftex ## @tex ## $$ ## Ax = b \qquad x \geq 0 ## $$ ## @end tex -## @end iftex ## @ifnottex ## @example ## @group @@ -54,13 +50,11 @@ ## ## but may also solve problems of the form ## -## @iftex ## @tex ## $$ ## [ \min_x | \max_x ] C^T x ## $$ ## @end tex -## @end iftex ## @ifnottex ## @example ## [ min | max ] C'*x @@ -69,13 +63,11 @@ ## ## subject to ## -## @iftex ## @tex ## $$ ## Ax [ = | \leq | \geq ] b \qquad LB \leq x \leq UB ## $$ ## @end tex -## @end iftex ## @ifnottex ## @example ## @group
--- a/scripts/optimization/qp.m +++ b/scripts/optimization/qp.m @@ -20,13 +20,11 @@ ## -*- texinfo -*- ## @deftypefn {Function File} {[@var{x}, @var{obj}, @var{info}, @var{lambda}] =} qp (@var{x0}, @var{H}, @var{q}, @var{A}, @var{b}, @var{lb}, @var{ub}, @var{A_lb}, @var{A_in}, @var{A_ub}) ## Solve the quadratic program -## @iftex ## @tex ## $$ ## \min_x {1 \over 2} x^T H x + x^T q ## $$ ## @end tex -## @end iftex ## @ifnottex ## ## @example @@ -38,13 +36,11 @@ ## ## @end ifnottex ## subject to -## @iftex ## @tex ## $$ ## Ax = b \qquad lb \leq x \leq ub \qquad A_{lb} \leq A_{in} \leq A_{ub} ## $$ ## @end tex -## @end iftex ## @ifnottex ## ## @example
--- a/scripts/optimization/sqp.m +++ b/scripts/optimization/sqp.m @@ -19,13 +19,11 @@ ## -*- texinfo -*- ## @deftypefn {Function File} {[@var{x}, @var{obj}, @var{info}, @var{iter}, @var{nf}, @var{lambda}] =} sqp (@var{x}, @var{phi}, @var{g}, @var{h}, @var{lb}, @var{ub}, @var{maxiter}, @var{tolerance}) ## Solve the nonlinear program -## @iftex ## @tex ## $$ ## \min_x \phi (x) ## $$ ## @end tex -## @end iftex ## @ifnottex ## ## @example @@ -37,13 +35,11 @@ ## ## @end ifnottex ## subject to -## @iftex ## @tex ## $$ ## g(x) = 0 \qquad h(x) \geq 0 \qquad lb \leq x \leq ub ## $$ ## @end tex -## @end iftex ## @ifnottex ## ## @example @@ -119,7 +115,6 @@ ## function and the second should point to a function that computes the ## gradient of the constraint function: ## -## @iftex ## @tex ## $$ ## \Bigg( {\partial f(x) \over \partial x_1}, @@ -127,7 +122,6 @@ ## {\partial f(x) \over \partial x_N} \Bigg)^T ## $$ ## @end tex -## @end iftex ## @ifnottex ## @example ## @group
--- a/scripts/plot/peaks.m +++ b/scripts/plot/peaks.m @@ -25,11 +25,9 @@ ## Generate a function with lots of local maxima and minima. The function ## has the form ## -## @iftex ## @tex ## $f(x,y) = 3 (1 - x) ^ 2 e ^ {\left(-x^2 - (y+1)^2\right)} - 10 \left({x \over 5} - x^3 - y^5)\right) - {1 \over 3} e^{\left(-(x+1)^2 - y^2\right)}$ ## @end tex -## @end iftex ## @ifnottex ## @verbatim ## f(x,y) = 3*(1-x)^2*exp(-x^2 - (y+1)^2) ...
--- a/scripts/plot/subplot.m +++ b/scripts/plot/subplot.m @@ -32,7 +32,6 @@ ## ## For example, a plot with 2 by 3 grid will have plot indices running as ## follows: -## @iftex ## @tex ## \vskip 10pt ## \hfil\vbox{\offinterlineskip\hrule @@ -42,7 +41,6 @@ ## \hfil ## \vskip 10pt ## @end tex -## @end iftex ## @ifnottex ## @display ## @example
--- a/scripts/polynomial/compan.m +++ b/scripts/polynomial/compan.m @@ -23,7 +23,6 @@ ## vector @var{c}. ## ## The companion matrix is -## @iftex ## @tex ## $$ ## A = \left[\matrix{ @@ -34,7 +33,6 @@ ## 0 & 0 & \cdots & 1 & 0}\right]. ## $$ ## @end tex -## @end iftex ## @ifnottex ## ## @c Set example in small font to prevent overfull line
--- a/scripts/polynomial/pchip.m +++ b/scripts/polynomial/pchip.m @@ -30,21 +30,17 @@ ## array. In the case where @var{y} is a vector, it must have a length ## of @var{n}. If @var{y} is an array, then the size of @var{y} must ## have the form -## @iftex ## @tex ## $$[s_1, s_2, \cdots, s_k, n]$$ ## @end tex -## @end iftex ## @ifnottex ## @code{[@var{s1}, @var{s2}, @dots{}, @var{sk}, @var{n}]} ## @end ifnottex ## The array is then reshaped internally to a matrix where the leading ## dimension is given by -## @iftex ## @tex ## $$s_1 s_2 \cdots s_k$$ ## @end tex -## @end iftex ## @ifnottex ## @code{@var{s1} * @var{s2} * @dots{} * @var{sk}} ## @end ifnottex
--- a/scripts/polynomial/polyout.m +++ b/scripts/polynomial/polyout.m @@ -20,11 +20,9 @@ ## -*- texinfo -*- ## @deftypefn {Function File} {} polyout (@var{c}, @var{x}) ## Write formatted polynomial -## @iftex ## @tex ## $$ c(x) = c_1 x^n + \ldots + c_n x + c_{n+1} $$ ## @end tex -## @end iftex ## @ifnottex ## @example ## c(x) = c(1) * x^n + @dots{} + c(n) x + c(n+1)
--- a/scripts/polynomial/residue.m +++ b/scripts/polynomial/residue.m @@ -23,14 +23,12 @@ ## Compute the partial fraction expansion for the quotient of the ## polynomials, @var{b} and @var{a}. ## -## @iftex ## @tex ## $$ ## {B(s)\over A(s)} = \sum_{m=1}^M {r_m\over (s-p_m)^e_m} ## + \sum_{i=1}^N k_i s^{N-i}. ## $$ ## @end tex -## @end iftex ## @ifnottex ## ## @example @@ -64,13 +62,11 @@ ## ## @noindent ## which represents the following partial fraction expansion -## @iftex ## @tex ## $$ ## {s^2+s+1\over s^3-5s^2+8s-4} = {-2\over s-2} + {7\over (s-2)^2} + {3\over s-1} ## $$ ## @end tex -## @end iftex ## @ifnottex ## ## @example @@ -125,13 +121,11 @@ ## ## @noindent ## which represents the following partial fraction expansion -## @iftex ## @tex ## $$ ## {-2\over s-2} + {7\over (s-2)^2} + {3\over s-1} + s = {s^4-5s^3+9s^2-3s+1\over s^3-5s^2+8s-4} ## $$ ## @end tex -## @end iftex ## @ifnottex ## ## @example
--- a/scripts/polynomial/roots.m +++ b/scripts/polynomial/roots.m @@ -22,13 +22,11 @@ ## ## For a vector @var{v} with @math{N} components, return ## the roots of the polynomial -## @iftex ## @tex ## $$ ## v_1 z^{N-1} + \cdots + v_{N-1} z + v_N. ## $$ ## @end tex -## @end iftex ## @ifnottex ## ## @example @@ -38,11 +36,9 @@ ## ## As an example, the following code finds the roots of the quadratic ## polynomial -## @iftex ## @tex ## $$ p(x) = x^2 - 5. $$ ## @end tex -## @end iftex ## @ifnottex ## @example ## p(x) = x^2 - 5. @@ -57,20 +53,16 @@ ## @end group ## @end example ## Note that the true result is -## @iftex ## @tex ## $\pm \sqrt{5}$ ## @end tex -## @end iftex ## @ifnottex ## @math{+/- sqrt(5)} ## @end ifnottex ## which is roughly -## @iftex ## @tex ## $\pm 2.2361$. ## @end tex -## @end iftex ## @ifnottex ## @math{+/- 2.2361}. ## @end ifnottex
--- a/scripts/polynomial/spline.m +++ b/scripts/polynomial/spline.m @@ -39,30 +39,24 @@ ## of the first derivative of the cubic spline at the end-points. ## ## If @var{y} is an array, then the size of @var{y} must have the form -## @iftex ## @tex ## $$[s_1, s_2, \cdots, s_k, n]$$ ## @end tex -## @end iftex ## @ifnottex ## @code{[@var{s1}, @var{s2}, @dots{}, @var{sk}, @var{n}]} ## @end ifnottex ## or -## @iftex ## @tex ## $$[s_1, s_2, \cdots, s_k, n + 2].$$ ## @end tex -## @end iftex ## @ifnottex ## @code{[@var{s1}, @var{s2}, @dots{}, @var{sk}, @var{n} + 2]}. ## @end ifnottex ## The array is then reshaped internally to a matrix where the leading ## dimension is given by -## @iftex ## @tex ## $$s_1 s_2 \cdots s_k$$ ## @end tex -## @end iftex ## @ifnottex ## @code{@var{s1} * @var{s2} * @dots{} * @var{sk}} ## @end ifnottex
--- a/scripts/signal/freqz.m +++ b/scripts/signal/freqz.m @@ -26,11 +26,9 @@ ## @ifnottex ## 2*pi. ## @end ifnottex -## @iftex ## @tex ## $2\pi$. ## @end tex -## @end iftex ## ## @noindent ## The output value @var{w} is a vector of the frequencies. @@ -40,11 +38,9 @@ ## @ifnottex ## pi. ## @end ifnottex -## @iftex ## @tex ## $\pi$. ## @end tex -## @end iftex ## ## If @var{n} is omitted, a value of 512 is assumed. ##
--- a/scripts/signal/sinc.m +++ b/scripts/signal/sinc.m @@ -20,11 +20,9 @@ ## -*- texinfo -*- ## @deftypefn {Function File} {} sinc (@var{x}) ## Return -## @iftex ## @tex ## $ \sin (\pi x)/(\pi x)$. ## @end tex -## @end iftex ## @ifnottex ## sin(pi*x)/(pi*x). ## @end ifnottex
--- a/scripts/specfun/beta.m +++ b/scripts/specfun/beta.m @@ -20,13 +20,11 @@ ## -*- texinfo -*- ## @deftypefn {Mapping Function} {} beta (@var{a}, @var{b}) ## For real inputs, return the Beta function, -## @iftex ## @tex ## $$ ## B (a, b) = {\Gamma (a) \Gamma (b) \over \Gamma (a + b)}. ## $$ ## @end tex -## @end iftex ## @ifnottex ## ## @example
--- a/scripts/specfun/betaln.m +++ b/scripts/specfun/betaln.m @@ -19,13 +19,11 @@ ## -*- texinfo -*- ## @deftypefn {Mapping Function} {} betaln (@var{a}, @var{b}) ## Return the log of the Beta function, -## @iftex ## @tex ## $$ ## B (a, b) = \log {\Gamma (a) \Gamma (b) \over \Gamma (a + b)}. ## $$ ## @end tex -## @end iftex ## @ifnottex ## ## @example
--- a/scripts/special-matrix/hankel.m +++ b/scripts/special-matrix/hankel.m @@ -27,13 +27,11 @@ ## ## A Hankel matrix formed from an m-vector @var{c}, and an n-vector ## @var{r}, has the elements -## @iftex ## @tex ## $$ ## H (i, j) = \cases{c_{i+j-1},&$i+j-1\le m$;\cr r_{i+j-m},&otherwise.\cr} ## $$ ## @end tex -## @end iftex ## @ifnottex ## ## @example
--- a/scripts/special-matrix/hilb.m +++ b/scripts/special-matrix/hilb.m @@ -20,22 +20,18 @@ ## -*- texinfo -*- ## @deftypefn {Function File} {} hilb (@var{n}) ## Return the Hilbert matrix of order @var{n}. The -## @iftex ## @tex ## $i,\,j$ ## @end tex -## @end iftex ## @ifnottex ## i, j ## @end ifnottex ## element of a Hilbert matrix is defined as -## @iftex ## @tex ## $$ ## H (i, j) = {1 \over (i + j - 1)} ## $$ ## @end tex -## @end iftex ## @ifnottex ## ## @example
--- a/scripts/special-matrix/sylvester_matrix.m +++ b/scripts/special-matrix/sylvester_matrix.m @@ -20,11 +20,9 @@ ## -*- texinfo -*- ## @deftypefn {Function File} {} sylvester_matrix (@var{k}) ## Return the Sylvester matrix of order -## @iftex ## @tex ## $n = 2^k$. ## @end tex -## @end iftex ## @ifnottex ## n = 2^k. ## @end ifnottex
--- a/scripts/special-matrix/toeplitz.m +++ b/scripts/special-matrix/toeplitz.m @@ -27,7 +27,6 @@ ## taken to be the same as the first column. ## ## A square Toeplitz matrix has the form: -## @iftex ## @tex ## $$ ## \left[\matrix{c_0 & r_1 & r_2 & \cdots & r_n\cr @@ -37,7 +36,6 @@ ## c_n & c_{n-1} & c_{n-2} & \ldots & c_0}\right] ## $$ ## @end tex -## @end iftex ## @ifnottex ## ## @example
--- a/scripts/special-matrix/vander.m +++ b/scripts/special-matrix/vander.m @@ -25,7 +25,6 @@ ## otherwise, @var{n} is taken to be equal to the length of @var{c}. ## ## A Vandermonde matrix has the form: -## @iftex ## @tex ## $$ ## \left[\matrix{c_1^{n-1} & \cdots & c_1^2 & c_1 & 1 \cr @@ -34,7 +33,6 @@ ## c_n^{n-1} & \cdots & c_n^2 & c_n & 1 }\right] ## $$ ## @end tex -## @end iftex ## @ifnottex ## ## @example
--- a/scripts/statistics/base/cloglog.m +++ b/scripts/statistics/base/cloglog.m @@ -21,13 +21,11 @@ ## @deftypefn {Function File} {} cloglog (@var{x}) ## Return the complementary log-log function of @var{x}, defined as ## -## @iftex ## @tex ## $$ ## {\rm cloglog}(x) = - \log (- \log (x)) ## $$ ## @end tex -## @end iftex ## @ifnottex ## @example ## cloglog(x) = - log (- log (@var{x}))
--- a/scripts/statistics/base/cor.m +++ b/scripts/statistics/base/cor.m @@ -25,13 +25,11 @@ ## the correlation between the @var{i}-th variable in @var{x} and the ## @var{j}-th variable in @var{y}. ## -## @iftex ## @tex ## $$ ## {\rm corrcoef}(x,y) = {{\rm cov}(x,y) \over {\rm std}(x) {\rm std}(y)} ## $$ ## @end tex -## @end iftex ## @ifnottex ## @example ## corrcoef(x,y) = cov(x,y)/(std(x)*std(y))
--- a/scripts/statistics/base/corrcoef.m +++ b/scripts/statistics/base/corrcoef.m @@ -26,13 +26,11 @@ ## @code{corrcoef (@var{x}, @var{y})} is the correlation between the ## @var{i}-th variable in @var{x} and the @var{j}-th variable in @var{y}. ## -## @iftex ## @tex ## $$ ## {\rm corrcoef}(x,y) = {{\rm cov}(x,y) \over {\rm std}(x) {\rm std}(y)} ## $$ ## @end tex -## @end iftex ## @ifnottex ## @example ## corrcoef(x,y) = cov(x,y)/(std(x)*std(y))
--- a/scripts/statistics/base/cov.m +++ b/scripts/statistics/base/cov.m @@ -25,14 +25,12 @@ ## a variable, the (@var{i}, @var{j})-th entry of ## @code{cov (@var{x}, @var{y})} is the covariance between the @var{i}-th ## variable in @var{x} and the @var{j}-th variable in @var{y}. -## @iftex ## @tex ## $$ ## \sigma_{ij} = {1 \over N-1} \sum_{i=1}^N (x_i - \bar{x})(y_i - \bar{y}) ## $$ ## where $\bar{x}$ and $\bar{y}$ are the mean values of $x$ and $y$. ## @end tex -## @end iftex ## If called with one argument, compute @code{cov (@var{x}, @var{x})}. ## @end deftypefn
--- a/scripts/statistics/base/gls.m +++ b/scripts/statistics/base/gls.m @@ -20,24 +20,20 @@ ## -*- texinfo -*- ## @deftypefn {Function File} {[@var{beta}, @var{v}, @var{r}] =} gls (@var{y}, @var{x}, @var{o}) ## Generalized least squares estimation for the multivariate model -## @iftex ## @tex ## $y = x b + e$ ## with $\bar{e} = 0$ and cov(vec($e$)) = $(s^2)o$, ## @end tex -## @end iftex ## @ifnottex ## @math{y = x b + e} with @math{mean (e) = 0} and ## @math{cov (vec (e)) = (s^2) o}, ## @end ifnottex ## where -## @iftex ## @tex ## $y$ is a $t \times p$ matrix, $x$ is a $t \times k$ matrix, $b$ is a $k ## \times p$ matrix, $e$ is a $t \times p$ matrix, and $o$ is a $tp \times ## tp$ matrix. ## @end tex -## @end iftex ## @ifnottex ## @math{y} is a @math{t} by @math{p} matrix, @math{x} is a @math{t} by ## @math{k} matrix, @math{b} is a @math{k} by @math{p} matrix, @math{e}
--- a/scripts/statistics/base/kendall.m +++ b/scripts/statistics/base/kendall.m @@ -33,11 +33,9 @@ ## differences of @var{x} and @var{y}; i.e., if both @var{x} and ## @var{y} have distinct entries, then ## -## @iftex ## @tex ## $$ \tau = {1 \over n(n-1)} \sum_{i,j} {\rm sign}(q_i-q_j) {\rm sign}(r_i-r_j) $$ ## @end tex -## @end iftex ## @ifnottex ## @example ## @group @@ -50,11 +48,9 @@ ## ## @noindent ## in which the -## @iftex ## @tex ## $q_i$ and $r_i$ ## @end tex -## @end iftex ## @ifnottex ## @var{q}(@var{i}) and @var{r}(@var{i}) ## @end ifnottex @@ -63,11 +59,9 @@ ## ## If @var{x} and @var{y} are drawn from independent distributions, ## Kendall's @var{tau} is asymptotically normal with mean 0 and variance -## @iftex ## @tex ## ${2 (2n+5) \over 9n(n-1)}$. ## @end tex -## @end iftex ## @ifnottex ## @code{(2 * (2@var{n}+5)) / (9 * @var{n} * (@var{n}-1))}. ## @end ifnottex
--- a/scripts/statistics/base/kurtosis.m +++ b/scripts/statistics/base/kurtosis.m @@ -20,14 +20,12 @@ ## -*- texinfo -*- ## @deftypefn {Function File} {} kurtosis (@var{x}, @var{dim}) ## If @var{x} is a vector of length @math{N}, return the kurtosis -## @iftex ## @tex ## $$ ## {\rm kurtosis} (x) = {1\over N \sigma(x)^4} \sum_{i=1}^N (x_i-\bar{x})^4 - 3 ## $$ ## where $\bar{x}$ is the mean value of $x$. ## @end tex -## @end iftex ## @ifnottex ## ## @example
--- a/scripts/statistics/base/logit.m +++ b/scripts/statistics/base/logit.m @@ -20,13 +20,11 @@ ## -*- texinfo -*- ## @deftypefn {Function File} {} logit (@var{p}) ## For each component of @var{p}, return the logit of @var{p} defined as -## @iftex ## @tex ## $$ ## {\rm logit}(p) = \log\Big({p \over 1-p}\Big) ## $$ ## @end tex -## @end iftex ## @ifnottex ## @example ## logit(@var{p}) = log (@var{p} / (1-@var{p}))
--- a/scripts/statistics/base/mean.m +++ b/scripts/statistics/base/mean.m @@ -20,11 +20,9 @@ ## -*- texinfo -*- ## @deftypefn {Function File} {} mean (@var{x}, @var{dim}, @var{opt}) ## If @var{x} is a vector, compute the mean of the elements of @var{x} -## @iftex ## @tex ## $$ {\rm mean}(x) = \bar{x} = {1\over N} \sum_{i=1}^N x_i $$ ## @end tex -## @end iftex ## @ifnottex ## ## @example
--- a/scripts/statistics/base/median.m +++ b/scripts/statistics/base/median.m @@ -22,7 +22,6 @@ ## If @var{x} is a vector, compute the median value of the elements of ## @var{x}. If the elements of @var{x} are sorted, the median is defined ## as -## @iftex ## @tex ## $$ ## {\rm median} (x) = @@ -30,7 +29,6 @@ ## (x(N/2)+x(N/2+1))/2, & $N$ even.} ## $$ ## @end tex -## @end iftex ## @ifnottex ## ## @example
--- a/scripts/statistics/base/ols.m +++ b/scripts/statistics/base/ols.m @@ -20,24 +20,20 @@ ## -*- texinfo -*- ## @deftypefn {Function File} {[@var{beta}, @var{sigma}, @var{r}] =} ols (@var{y}, @var{x}) ## Ordinary least squares estimation for the multivariate model -## @iftex ## @tex ## $y = x b + e$ ## with ## $\bar{e} = 0$, and cov(vec($e$)) = kron ($s, I$) ## @end tex -## @end iftex ## @ifnottex ## @math{y = x b + e} with ## @math{mean (e) = 0} and @math{cov (vec (e)) = kron (s, I)}. ## @end ifnottex ## where -## @iftex ## @tex ## $y$ is a $t \times p$ matrix, $x$ is a $t \times k$ matrix, ## $b$ is a $k \times p$ matrix, and $e$ is a $t \times p$ matrix. ## @end tex -## @end iftex ## @ifnottex ## @math{y} is a @math{t} by @math{p} matrix, @math{x} is a @math{t} by ## @math{k} matrix, @math{b} is a @math{k} by @math{p} matrix, and
--- a/scripts/statistics/base/skewness.m +++ b/scripts/statistics/base/skewness.m @@ -20,14 +20,12 @@ ## -*- texinfo -*- ## @deftypefn {Function File} {} skewness (@var{x}, @var{dim}) ## If @var{x} is a vector of length @math{n}, return the skewness -## @iftex ## @tex ## $$ ## {\rm skewness} (x) = {1\over N \sigma(x)^3} \sum_{i=1}^N (x_i-\bar{x})^3 ## $$ ## where $\bar{x}$ is the mean value of $x$. ## @end tex -## @end iftex ## @ifnottex ## ## @example
--- a/scripts/statistics/base/std.m +++ b/scripts/statistics/base/std.m @@ -23,14 +23,12 @@ ## @deftypefnx {Function File} {} std (@var{x}, @var{opt}, @var{dim}) ## If @var{x} is a vector, compute the standard deviation of the elements ## of @var{x}. -## @iftex ## @tex ## $$ ## {\rm std} (x) = \sigma (x) = \sqrt{{\sum_{i=1}^N (x_i - \bar{x})^2 \over N - 1}} ## $$ ## where $\bar{x}$ is the mean value of $x$. ## @end tex -## @end iftex ## @ifnottex ## ## @example
--- a/scripts/statistics/distributions/kolmogorov_smirnov_cdf.m +++ b/scripts/statistics/distributions/kolmogorov_smirnov_cdf.m @@ -20,11 +20,9 @@ ## -*- texinfo -*- ## @deftypefn {Function File} {} kolmogorov_smirnov_cdf (@var{x}, @var{tol}) ## Return the CDF at @var{x} of the Kolmogorov-Smirnov distribution, -## @iftex ## @tex ## $$ Q(x) = \sum_{k=-\infty}^\infty (-1)^k \exp(-2 k^2 x^2) $$ ## @end tex -## @end iftex ## @ifnottex ## @example ## @group
--- a/scripts/statistics/distributions/wblcdf.m +++ b/scripts/statistics/distributions/wblcdf.m @@ -22,12 +22,10 @@ ## Weibull distribution with shape parameter @var{scale} and scale ## parameter @var{shape}, which is ## -## @iftex ## @tex ## $$ 1 - \exp(-(x/shape)^{scale}) $$ ## for $x\geq 0$. ## @end tex -## @end iftex ## @ifnottex ## @example ## 1 - exp(-(x/shape)^scale)
--- a/scripts/statistics/distributions/wblpdf.m +++ b/scripts/statistics/distributions/wblpdf.m @@ -22,11 +22,9 @@ ## Weibull distribution with shape parameter @var{scale} and scale ## parameter @var{shape} which is given by ## -## @iftex ## @tex ## $$ scale \cdot shape^{-scale} x^{scale-1} \exp(-(x/shape)^{scale}) $$ ## @end tex -## @end iftex ## @ifnottex ## @example ## scale * shape^(-scale) * x^(scale-1) * exp(-(x/shape)^scale)
--- a/scripts/statistics/tests/hotelling_test_2.m +++ b/scripts/statistics/tests/hotelling_test_2.m @@ -26,13 +26,11 @@ ## ## Hotelling's two-sample @math{T^2} is returned in @var{tsq}. Under the null, ## -## @iftex ## @tex ## $$ ## {n_x+n_y-p-1) T^2 \over p(n_x+n_y-2)} ## $$ ## @end tex -## @end iftex ## @ifnottex ## @example ## (n_x+n_y-p-1) T^2 / (p(n_x+n_y-2))